#[repr(transparent)]pub struct PhantomInvariantLifetime<'a>(PhantomInvariant<&'a ()>);🔬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>>() == 0align_of::<PhantomInvariantLifetime<'a>>() == 1
Tuple Fields§
§0: PhantomInvariant<&'a ()>🔬This is a nightly-only experimental API. (
phantom_variance_markers #135806)Implementations§
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)where
Self:,
fn clone_from(&mut self, source: &Self)where
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> Eq for PhantomInvariantLifetime<'a>
impl<'a> Eq for PhantomInvariantLifetime<'a>
#[doc(hidden)] fn assert_receiver_is_total_eq(&self)
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>
Source§fn partial_cmp(&self, other: &PhantomInvariantLifetime<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &PhantomInvariantLifetime<'a>) -> Option<Ordering>
Source§#[doc(hidden)] fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)If
self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)] fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)Same as
__chaining_lt, but for <= instead of <.Source§#[doc(hidden)] fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)Same as
__chaining_lt, but for > instead of <.Source§#[doc(hidden)] fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)Same as
__chaining_lt, but for >= instead of <.Source§impl Sealed for PhantomInvariantLifetime<'_>
impl Sealed for PhantomInvariantLifetime<'_>
impl<'a> Copy for PhantomInvariantLifetime<'a>
impl<'a> StructuralPartialEq for PhantomInvariantLifetime<'a>
impl<'a> TrivialClone 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const SIZE: usize = _
#[doc(hidden)] const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const ALIGN: usize = _
#[doc(hidden)] const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more