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> PartialOrd for Nothing<'a>
impl<'a> PartialOrd for Nothing<'a>
impl<'a> Copy for Nothing<'a>
impl<'a> Eq for Nothing<'a>
impl<'a> StructuralPartialEq for Nothing<'a>
Auto Trait Implementations§
impl<'a> Freeze for Nothing<'a>
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