pub struct PhantomContravariantLifetime<'a>(/* private fields */);
๐ฌThis is a nightly-only experimental API. (
phantom_variance_markers
)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
Implementationsยง
Sourceยงimpl PhantomContravariantLifetime<'_>
impl PhantomContravariantLifetime<'_>
Sourcepub const fn new() -> PhantomContravariantLifetime<'_>
๐ฌThis is a nightly-only experimental API. (phantom_variance_markers
)
pub const fn new() -> PhantomContravariantLifetime<'_>
phantom_variance_markers
)Constructs a new instance of the variance marker.
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> 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>
impl<'a> Copy for PhantomContravariantLifetime<'a>
impl<'a> Eq 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> UnwindSafe for PhantomContravariantLifetime<'a>
Blanket Implementationsยง
Sourceยงimpl<S> AssignWithType for S
impl<S> AssignWithType for S
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Sourceยงimpl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Sourceยงtype Val = <C as Collection>::Val
type Val = <C as Collection>::Val
The type of values stored in the collection. This might be distinct from
Entry
in complex collections.
For example, in a HashMap
, while Entry
might be a ( key, value ) tuple, Val
might only be the value part.Sourceยงfn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Converts an entry into a value representation specific to the type of collection. This conversion is crucial
for handling operations on entries, especially when they need to be treated or accessed as individual values,
such as retrieving the value part from a key-value pair in a hash map.
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Sourceยงimpl<'a, T> ToStringWith<WithDebug> for T
impl<'a, T> ToStringWith<WithDebug> for T
Sourceยงfn to_string_with<'s>(&'s self) -> Cow<'s, str>
fn to_string_with<'s>(&'s self) -> Cow<'s, str>
Converts the type to a string using Debug formatting.
Sourceยงimpl<'a, T> ToStringWith<WithDebugMultiline> for T
impl<'a, T> ToStringWith<WithDebugMultiline> for T
Sourceยงfn to_string_with<'s>(&'s self) -> Cow<'s, str>
fn to_string_with<'s>(&'s self) -> Cow<'s, str>
Converts the type to a string using Debug formatting.
Sourceยงimpl<Initial, Error, Final> TransitiveTryFrom<Error, Initial> for Final
impl<Initial, Error, Final> TransitiveTryFrom<Error, Initial> for Final
Sourceยงimpl<Error, Final, Initial> TransitiveTryInto<Error, Final> for Initial
impl<Error, Final, Initial> TransitiveTryInto<Error, Final> for Initial
Sourceยงimpl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Sourceยงfn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry
function of the CollectionValToEntry
trait to convert the value to an entry.
Sourceยงtype Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Represents the type of entry that corresponds to the value within the collection.