Trait PinProjectEither
pub unsafe trait PinProjectEither { }Expand description
Opt-in for the pin projection of a type generated by [define_either!].
[define_either!] provides as_pin_mut, and the Future impl built on it, only for
types that implement this trait; so do the impls of impl_async_read_write_either!.
§Safety
The implementor, which must be the crate that invoked [define_either!] for the type,
must ensure that for every instantiation of its type parameters the type has no Unpin
impl other than the auto-trait one and no Drop impl. A variant reached through
Pin<&mut Self> is then never moved before it is dropped (structural pinning).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".