Available on crate feature
phantom only.Expand description
PhantomData-related items.
Structs§
- AndPhantom
- A pair of
PhantomData<T>andT. useful for infering the type of the value from aPhantomData. - AndPhantom
Cov - A pair of
PhantomData<fn() -> T>andT. useful for infering the type of the value from aPhantomData. - Covariant
Phantom Data - Contains
PhantomData<fn() -> T>, required to return aPhantomData<fn() -> T>from theas_covariant_phantomconst function.
Traits§
- AsPhantom
Data - For getting a
PhantomData<Self>with a variety of lifetime variances.
Functions§
- as_
covariant_ phantom - Gets the
PhantomData<fn() -> T>of the passed inT. - as_
phantom - Gets the
PhantomDataof the passed in type.
Type Aliases§
- Contra
Variant Phantom - Type alias for a contravariant
PhantomData, without drop check. - Covariant
Phantom - Type alias for a variant
PhantomData, without drop check. - Invariant
Phantom - Type alias for an invariant
PhantomData. - Invariant
RefPhantom - Type alias for an
PhantomDatawith an invariant lifetime. - Variant
Drop Phantom - Type alias for a variant
PhantomDatawith drop check.