Struct PhantomCovariantLifetime

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

Zero-sized type used to mark a lifetime as covariant.

Covariant lifetimes must live at least as long as declared. See the reference for more information.

Note: If 'a is otherwise contravariant or invariant, the resulting type is invariant.

Layout

For all 'a, the following are guaranteed:

Fields

0: PhantomCovariant<&'a ()>

Implementations

impl PhantomCovariantLifetime<'_>

const fn new() -> Self

Constructs a new instance of the variance marker.

Trait Implementations

impl Debug for PhantomCovariantLifetime<'_>

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

impl PrivateItems for PhantomCovariantLifetime<'_>

const VALUE: Self = _;

impl Variance for PhantomCovariantLifetime<'_>

impl<'a> Clone for PhantomCovariantLifetime<'a>

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

impl<'a> Copy for PhantomCovariantLifetime<'a>

impl<'a> Default for PhantomCovariantLifetime<'a>

fn default() -> PhantomCovariantLifetime<'a>

impl<'a> Eq for PhantomCovariantLifetime<'a>

fn assert_fields_are_eq(&self)

impl<'a> Hash for PhantomCovariantLifetime<'a>

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

impl<'a> Ord for PhantomCovariantLifetime<'a>

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

impl<'a> PartialEq for PhantomCovariantLifetime<'a>

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

impl<'a> PartialOrd for PhantomCovariantLifetime<'a>

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

impl<'a> StructuralPartialEq for PhantomCovariantLifetime<'a>

impl<'a> TrivialClone for PhantomCovariantLifetime<'a>

Auto Trait Implementations

impl<'a> Freeze for PhantomCovariantLifetime<'a>

impl<'a> RefUnwindSafe for PhantomCovariantLifetime<'a>

impl<'a> Send for PhantomCovariantLifetime<'a>

impl<'a> Sync for PhantomCovariantLifetime<'a>

impl<'a> Unpin for PhantomCovariantLifetime<'a>

impl<'a> UnsafeUnpin for PhantomCovariantLifetime<'a>

impl<'a> UnwindSafe for PhantomCovariantLifetime<'a>

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

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

fn from(t: T) -> T

Returns the argument unchanged.

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

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

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

impl<T> SizedTypeProperties for PhantomCovariantLifetime<'a>

impl<T, U> Into<U> for PhantomCovariantLifetime<'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 PhantomCovariantLifetime<'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 PhantomCovariantLifetime<'a> where U: TryFrom<T>,

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