Pining for Arc Downcasting in Rust
This Rust deep dive explores how to project a cheap, owned handle into a subobject without cloning the underlying value—and why making that handle self-referential safely is difficult.
The author builds a pinned Arc-backed handle and uses a higher-ranked projection closure to derive a typed view, after demonstrating why a simpler lifetime-extension attempt breaks when the value moves. The proposed technique uses unsafe pointer bookkeeping; the author explicitly says the design may still contain undefined behavior and has not packaged it as a library. Treat it as an exploration, not drop-in code.
A Lobsters commenter pointed to yoke, which solves a similar zero-copy ownership problem using a different API and established StableDeref invariants; the author agreed that it may be the better practical choice.