pub struct Nothing<'a> { /* private fields */ }
Expand description
A marker type representing a borrow of… “nothing.”
When passed as a parameter to any borrow-adjacent function or method in this crate, this type essentially turns that operation into a no-op. The lifetime is merely a placeholder to help with the common idioms detailed in the Dealing with Limitations section of the integration guide.
This is useful for disabling borrows for a given RAII’d AuToken object, as needed by
strip_lifetime_analysis
or for tying an object’s borrow to a different MutableBorrow
or
ImmutableBorrow
guard.
An instance of this type cannot be obtained—it is a marker type.
Trait Implementations§
source§impl<'a> Ord for Nothing<'a>
impl<'a> Ord for Nothing<'a>
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 Nothing<'a>
impl<'a> PartialEq for Nothing<'a>
source§impl<'a> PartialOrd for Nothing<'a>
impl<'a> PartialOrd for Nothing<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Copy for Nothing<'a>
impl<'a> Eq for Nothing<'a>
impl<'a> StructuralEq for Nothing<'a>
impl<'a> StructuralPartialEq for Nothing<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Nothing<'a>
impl<'a> Send for Nothing<'a>
impl<'a> Sync for Nothing<'a>
impl<'a> Unpin for Nothing<'a>
impl<'a> UnwindSafe for Nothing<'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