pub struct PhantomInvariantLifetime<'a>(/* private fields */);๐ฌThis is a nightly-only experimental API. (
phantom_variance_markers)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>>() == 0align_of::<PhantomInvariantLifetime<'a>>() == 1
Implementationsยง
Sourceยงimpl PhantomInvariantLifetime<'_>
impl PhantomInvariantLifetime<'_>
Sourcepub const fn new() -> PhantomInvariantLifetime<'_>
๐ฌThis is a nightly-only experimental API. (phantom_variance_markers)
pub const fn new() -> PhantomInvariantLifetime<'_>
phantom_variance_markers)Constructs a new instance of the variance marker.
Trait Implementationsยง
Sourceยงimpl<'a> Clone for PhantomInvariantLifetime<'a>
impl<'a> Clone for PhantomInvariantLifetime<'a>
Sourceยงfn clone(&self) -> PhantomInvariantLifetime<'a>
fn clone(&self) -> PhantomInvariantLifetime<'a>
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for PhantomInvariantLifetime<'_>
impl Debug for PhantomInvariantLifetime<'_>
Sourceยงimpl<'a> Default for PhantomInvariantLifetime<'a>
impl<'a> Default for PhantomInvariantLifetime<'a>
Sourceยงfn default() -> PhantomInvariantLifetime<'a>
fn default() -> PhantomInvariantLifetime<'a>
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<'a> Hash for PhantomInvariantLifetime<'a>
impl<'a> Hash for PhantomInvariantLifetime<'a>
Sourceยงimpl<'a> Ord for PhantomInvariantLifetime<'a>
impl<'a> Ord for PhantomInvariantLifetime<'a>
Sourceยงfn cmp(&self, other: &PhantomInvariantLifetime<'a>) -> Ordering
fn cmp(&self, other: &PhantomInvariantLifetime<'a>) -> Ordering
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Sourceยงimpl<'a> PartialEq for PhantomInvariantLifetime<'a>
impl<'a> PartialEq for PhantomInvariantLifetime<'a>
Sourceยงfn eq(&self, other: &PhantomInvariantLifetime<'a>) -> bool
fn eq(&self, other: &PhantomInvariantLifetime<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl<'a> PartialOrd for PhantomInvariantLifetime<'a>
impl<'a> PartialOrd for PhantomInvariantLifetime<'a>
impl<'a> Copy for PhantomInvariantLifetime<'a>
impl<'a> Eq for PhantomInvariantLifetime<'a>
impl<'a> StructuralPartialEq for PhantomInvariantLifetime<'a>
impl Variance for PhantomInvariantLifetime<'_>
Auto Trait Implementationsยง
impl<'a> Freeze for PhantomInvariantLifetime<'a>
impl<'a> RefUnwindSafe for PhantomInvariantLifetime<'a>
impl<'a> Send for PhantomInvariantLifetime<'a>
impl<'a> Sync for PhantomInvariantLifetime<'a>
impl<'a> Unpin for PhantomInvariantLifetime<'a>
impl<'a> UnsafeUnpin for PhantomInvariantLifetime<'a>
impl<'a> UnwindSafe for PhantomInvariantLifetime<'a>
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Sourceยงimpl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
Sourceยงfn defensive_max(self, other: T) -> T
fn defensive_max(self, other: T) -> T
Sourceยงfn defensive_strict_max(self, other: T) -> T
fn defensive_strict_max(self, other: T) -> T
Sourceยงimpl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
Sourceยงfn defensive_min(self, other: T) -> T
fn defensive_min(self, other: T) -> T
Sourceยงfn defensive_strict_min(self, other: T) -> T
fn defensive_strict_min(self, other: T) -> T
Sourceยงimpl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Sourceยงfn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Defensively truncate a value and convert it into its bounded form.
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงfn in_current_span(self) -> Instrumented<Self> โ
fn in_current_span(self) -> Instrumented<Self> โ
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงimpl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Sourceยงimpl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Sourceยงimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Sourceยงfn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Sourceยงfn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moreSourceยงimpl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Sourceยงimpl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Sourceยงfn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.Sourceยงimpl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Sourceยงfn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.