Closed Astralchroma closed 4 months ago
Seems the lints are bugged and are flagging the macros as unused when they are in fact used. I'll go ahead and add an #[allow(unused_macros)]
for now.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.55%. Comparing base (
f4145e3
) to head (04de4ce
). Report is 14 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi, thank you for submitting the PR. Everything looks good here. I extended the SerializeAs
side with support for Pin<&'a T>
and Pin<&'a mut T>
.
I wonder if it is possible to support any Pin<T>
, not just with specific pointer types. Pin::as_ref
almost looks like it could work, but then is also return Deref::Target
and I couldn't figure out how to make that work. On the deserialization side we need the well-known pointer types, since only they have safe conversions to Pin
.
I leave this PR open for a day or two, in case you have an idea how to extend the serialization side, otherwise this looks good to merge.
Yea, honestly not sure about how to go about extending it to work using Deref stuff. Had a go at it myself and couldn't really get very far with it. Might come back to it later as it seems like an interesting idea, however I'm just going to leave it for now I think.
Implements
SerializeAs
andDeserializeAs
forPin<Box<T>>
,Pin<Rc<T>>
, andPin<Arc<T>>