Crate reft

Source
Expand description

Ref & Mut — Universal AsRef/AsMut bridges for any reference.

Turns &T into AsRef<T> and &mut T into AsMut<T> with zero cost. Perfect for generics that need trait bounds on foreign types.

Structs§

Mut
Mutable reference with AsRef<T> + AsMut<T> impls.
Like &mut T, but plays nice with trait bounds.
Own
Owned data with AsRef<T> + AsMut<T> impls.
Ref
Immutable reference with guaranteed AsRef<T> impl.
Works on any type, including those you don’t control.