Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ids1024 opened this issue Jun 21, 2022 · 0 comments · May be fixed by #18
Open

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

ids1024 opened this issue Jun 21, 2022 · 0 comments · May be fixed by #18

Comments

@ids1024
Copy link

ids1024 commented Jun 21, 2022

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...

@neocturne neocturne linked a pull request May 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant