Skip to content

Support for initializing tuple-structs #85

@bonzini

Description

@bonzini

Is your feature request related to a problem? Please describe.
Currently, pin-init does not support initializing tuple structs, which could be useful to write concise wrappers like

#[pin_data]
struct Gadget(#[pin] Opaque<bindings::Gadget>);

(Optional) Solution Implementation
Implementation should not be hard, since C code can expand the field numbers and pass them to the internal Rust macros. The Rust macros need to change the fields from $field:ident to $field:tt.

Additional context
This is especially useful in order to implement PinnedDrop for the wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions