Struct PhantomInvariantLifetime

#[repr(transparent)]
pub struct PhantomInvariantLifetime<'a>(pub(in ::marker::variance) PhantomInvariant<&'a ()>);

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:

Fields

0: PhantomInvariant<&'a ()>

Implementations

impl PhantomInvariantLifetime<'_>

const fn new() -> Self

Constructs a new instance of the variance marker.

Trait Implementations

impl Debug for PhantomInvariantLifetime<'_>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl PrivateItems for PhantomInvariantLifetime<'_>

const VALUE: Self = _;

impl Variance for PhantomInvariantLifetime<'_>

impl<'a> Clone for PhantomInvariantLifetime<'a>

fn clone(&self) -> PhantomInvariantLifetime<'a>

impl<'a> Copy for PhantomInvariantLifetime<'a>

impl<'a> Default for PhantomInvariantLifetime<'a>

fn default() -> PhantomInvariantLifetime<'a>

impl<'a> Eq for PhantomInvariantLifetime<'a>

fn assert_fields_are_eq(&self)

impl<'a> Hash for PhantomInvariantLifetime<'a>

fn hash<__H: Hasher>(&self, state: &mut __H)

impl<'a> Ord for PhantomInvariantLifetime<'a>

fn cmp(&self, other: &PhantomInvariantLifetime<'a>) -> Ordering

impl<'a> PartialEq for PhantomInvariantLifetime<'a>

fn eq(&self, other: &PhantomInvariantLifetime<'a>) -> bool

impl<'a> PartialOrd for PhantomInvariantLifetime<'a>

fn partial_cmp(&self, other: &PhantomInvariantLifetime<'a>) -> Option<Ordering>

impl<'a> StructuralPartialEq for PhantomInvariantLifetime<'a>

impl<'a> TrivialClone for PhantomInvariantLifetime<'a>

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

impl<T> Any for PhantomInvariantLifetime<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for PhantomInvariantLifetime<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for PhantomInvariantLifetime<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for PhantomInvariantLifetime<'a> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for PhantomInvariantLifetime<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Printable for PhantomInvariantLifetime<'a> where T: Copy + Debug,

impl<T> SizeHint for PhantomInvariantLifetime<'a> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for PhantomInvariantLifetime<'a>

impl<T, U> Into<U> for PhantomInvariantLifetime<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for PhantomInvariantLifetime<'a> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for PhantomInvariantLifetime<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>