Skip to content

Option<Box<T<'a>>> fields where Talso has into_owned #13

@ids1024

Description

@ids1024

I'm trying to use this for the SinkInfo<'a> in libpulse_binding (jnqnfe/pulse-binding-rust#44), but it has a field active_port: Option<Box<SinkPortInfo<'a>>>.

I guess to handle this, it would need to have logic to handle Boxes, like it handles Option, and FieldKind::resolve would have to be recursive to allow a Box inside an Option. I'm looking into how to implement this, since recursing in particular changes some things.

I guess it could also be helpful with complicated structs to have something like serde's deserialize_with to provide a custom into_owned for a field...

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