Pining for Arc Downcasting in Rust
5 points by polywolf
5 points by polywolf
This is neat! I think yoke does something similar. It was designed for zero-copy deserialization but I think it could be used for the same thing. It seems like it doesn't use Pin because instead of Deref it has a get() method which returns a local lifetime, but I'm not too sure of the specifics.
yep! it's a very similar design. looks like it uses a StableDeref trait from a non-standard-library crate to be safe. That crate was originally released before Pin was established, seems to provide some of the same invariants.
If i weren't so insistent on only using the standard library & understanding everything myself, i probably should have just used yoke instead :P
Soon we shall have Arc::map and the nightmare will be over
Oh no this doesn't do what I thought