pub struct TempRef<T: ?Sized>(/* private fields */);
Expand description
The canonical implementation of TempRepr
, representing a single shared reference.
This is not necessarily very useful on its own, but forms the basis of composition via tuples.
Trait Implementations§
Source§impl<T: ?Sized + Ord> Ord for TempRef<T>
impl<T: ?Sized + Ord> Ord for TempRef<T>
Source§impl<T: ?Sized + PartialOrd> PartialOrd for TempRef<T>
impl<T: ?Sized + PartialOrd> PartialOrd for TempRef<T>
Source§impl<T: ?Sized> TempRepr for TempRef<T>
impl<T: ?Sized> TempRepr for TempRef<T>
Source§impl<T: ?Sized> TempReprMutChk for TempRef<T>
impl<T: ?Sized> TempReprMutChk for TempRef<T>
type SwapChkData = NonNull<T>
Source§fn swap_chk_data(&self) -> Self::SwapChkData
fn swap_chk_data(&self) -> Self::SwapChkData
Obtains an object (usually a copy of the internal state of
self
) that can be used to check
whether self
was swapped with another instance of Self
in such a way that the safety
rules of TempReprMutChk
are violated.impl<T: ?Sized + Eq> Eq for TempRef<T>
impl<T: ?Sized + Sync> Send for TempRef<T>
impl<T: ?Sized + Sync> Sync for TempRef<T>
Auto Trait Implementations§
impl<T> Freeze for TempRef<T>where
T: ?Sized,
impl<T> RefUnwindSafe for TempRef<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for TempRef<T>where
T: ?Sized,
impl<T> UnwindSafe for TempRef<T>where
T: RefUnwindSafe + ?Sized,
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> 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> TempReprMut for Twhere
T: AlwaysShared,
impl<T> TempReprMut for Twhere
T: AlwaysShared,
Source§type Mutable<'a> = <T as TempRepr>::Shared<'a>
where
T: 'a
type Mutable<'a> = <T as TempRepr>::Shared<'a> where T: 'a
The type that
Self
is a temporary representation of. May contain mutable references of
lifetime 'a
.Source§unsafe fn new_temp_mut(obj: <T as TempReprMut>::Mutable<'_>) -> T
unsafe fn new_temp_mut(obj: <T as TempReprMut>::Mutable<'_>) -> T
Converts the given object to a temporary representation without a lifetime parameter. Read more
Source§fn get_mut(&mut self) -> <T as TempReprMut>::Mutable<'_>
fn get_mut(&mut self) -> <T as TempReprMut>::Mutable<'_>
Converts from a mutable reference to the temporary representation back to the original type,
with a restricted lifetime.
Source§fn get_mut_pinned(self: Pin<&mut T>) -> <T as TempReprMut>::Mutable<'_>
fn get_mut_pinned(self: Pin<&mut T>) -> <T as TempReprMut>::Mutable<'_>
Like
TempReprMut::get_mut
, but takes a pinned mutable reference to Self
.