PhantomInvariantLifetime in core::marker - Rust (original) (raw)
Struct PhantomInvariantLifetime
pub struct PhantomInvariantLifetime<'a>(/* private fields */);
🔬This is a nightly-only experimental API. (phantom_variance_markers
#135806)
Expand description
Zero-sized type used to mark a lifetime as invariant.
Invariant lifetimes must be live for the exact length declared, neither shorter nor longer. See the reference for more information.
§Layout
For all 'a
, the following are guaranteed:
size_of::<PhantomInvariantLifetime<'a>>() == 0
align_of::<PhantomInvariantLifetime<'a>>() == 1
🔬This is a nightly-only experimental API. (phantom_variance_markers
#135806)
Constructs a new instance of the variance marker.