Skip to main content

Module phantom

Module phantom 

Source
Available on crate feature phantom only.
Expand description

PhantomData-related items.

Structs§

AndPhantom
A pair of PhantomData<T> and T. useful for infering the type of the value from a PhantomData.
AndPhantomCov
A pair of PhantomData<fn() -> T> and T. useful for infering the type of the value from a PhantomData.
CovariantPhantomData
Contains PhantomData<fn() -> T>, required to return a PhantomData<fn() -> T> from the as_covariant_phantom const function.

Traits§

AsPhantomData
For getting a PhantomData<Self> with a variety of lifetime variances.

Functions§

as_covariant_phantom
Gets the PhantomData<fn() -> T> of the passed in T.
as_phantom
Gets the PhantomData of the passed in type.

Type Aliases§

ContraVariantPhantom
Type alias for a contravariant PhantomData, without drop check.
CovariantPhantom
Type alias for a variant PhantomData, without drop check.
InvariantPhantom
Type alias for an invariant PhantomData.
InvariantRefPhantom
Type alias for an PhantomData with an invariant lifetime.
VariantDropPhantom
Type alias for a variant PhantomData with drop check.