#[repr(transparent)]pub struct PhantomContravariantLifetime<'a>(PhantomContravariant<&'a ()>);
๐ฌThis is a nightly-only experimental API. (
phantom_variance_markers
#135806)Expand description
Zero-sized type used to mark a lifetime as contravariant.
Contravariant lifetimes must live at most as long as declared. See the reference for more information.
ยงLayout
For all 'a
, the following are guaranteed:
size_of::<PhantomContravariantLifetime<'a>>() == 0
align_of::<PhantomContravariantLifetime<'a>>() == 1
Tuple Fieldsยง
ยง0: PhantomContravariant<&'a ()>
๐ฌThis is a nightly-only experimental API. (
phantom_variance_markers
#135806)Implementationsยง
Trait Implementationsยง
Sourceยงimpl<'a> Clone for PhantomContravariantLifetime<'a>
impl<'a> Clone for PhantomContravariantLifetime<'a>
Sourceยงfn clone(&self) -> PhantomContravariantLifetime<'a>
fn clone(&self) -> PhantomContravariantLifetime<'a>
Returns a copy 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 PhantomContravariantLifetime<'_>
impl Debug for PhantomContravariantLifetime<'_>
Sourceยงimpl<'a> Default for PhantomContravariantLifetime<'a>
impl<'a> Default for PhantomContravariantLifetime<'a>
Sourceยงfn default() -> PhantomContravariantLifetime<'a>
fn default() -> PhantomContravariantLifetime<'a>
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<'a> Eq for PhantomContravariantLifetime<'a>
impl<'a> Eq for PhantomContravariantLifetime<'a>
#[doc(hidden)] fn assert_receiver_is_total_eq(&self)
Sourceยงimpl<'a> Hash for PhantomContravariantLifetime<'a>
impl<'a> Hash for PhantomContravariantLifetime<'a>
Sourceยงimpl<'a> Ord for PhantomContravariantLifetime<'a>
impl<'a> Ord for PhantomContravariantLifetime<'a>
Sourceยงfn cmp(&self, other: &PhantomContravariantLifetime<'a>) -> Ordering
fn cmp(&self, other: &PhantomContravariantLifetime<'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 PhantomContravariantLifetime<'a>
impl<'a> PartialEq for PhantomContravariantLifetime<'a>
Sourceยงfn eq(&self, other: &PhantomContravariantLifetime<'a>) -> bool
fn eq(&self, other: &PhantomContravariantLifetime<'a>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Sourceยงimpl<'a> PartialOrd for PhantomContravariantLifetime<'a>
impl<'a> PartialOrd for PhantomContravariantLifetime<'a>
Sourceยงfn partial_cmp(
&self,
other: &PhantomContravariantLifetime<'a>,
) -> Option<Ordering>
fn partial_cmp( &self, other: &PhantomContravariantLifetime<'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 PhantomContravariantLifetime<'_>
impl Sealed for PhantomContravariantLifetime<'_>
impl<'a> Copy for PhantomContravariantLifetime<'a>
impl<'a> StructuralPartialEq for PhantomContravariantLifetime<'a>
impl Variance for PhantomContravariantLifetime<'_>
Auto Trait Implementationsยง
impl<'a> Freeze for PhantomContravariantLifetime<'a>
impl<'a> RefUnwindSafe for PhantomContravariantLifetime<'a>
impl<'a> Send for PhantomContravariantLifetime<'a>
impl<'a> Sync for PhantomContravariantLifetime<'a>
impl<'a> Unpin for PhantomContravariantLifetime<'a>
impl<'a> UnsafeUnpin for PhantomContravariantLifetime<'a>
impl<'a> UnwindSafe for PhantomContravariantLifetime<'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 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