pub struct StretchedRef<T: ?Sized>(/* private fields */);
Expand description
A type representing a stretched &T
reference. Has the same representation as a *const T
.
Trait Implementations§
Source§impl<T: Clone + ?Sized> Clone for StretchedRef<T>
impl<T: Clone + ?Sized> Clone for StretchedRef<T>
Source§fn clone(&self) -> StretchedRef<T>
fn clone(&self) -> StretchedRef<T>
Returns a duplicate 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<T: 'static> Stretched for StretchedRef<T>
impl<T: 'static> Stretched for StretchedRef<T>
Source§type Parameterized<'a> = &'a T
type Parameterized<'a> = &'a T
The parameterized type, which must be bit-equivalent to the unparameterized
Self
type. It
must have the same size, same pointer size, same alignment, same everything.Source§unsafe fn lengthen(this: Self::Parameterized<'_>) -> Self
unsafe fn lengthen(this: Self::Parameterized<'_>) -> Self
Source§unsafe fn shorten<'a>(this: Self) -> Self::Parameterized<'a>
unsafe fn shorten<'a>(this: Self) -> Self::Parameterized<'a>
Shorten the lifetime of a
'static
self to some arbitrary Stretched::Parameterized
.
This is intended strictly as the inverse of Stretched::lengthen
, and makes no guarantees
about its behavior if not used as such. Read moreSource§unsafe fn shorten_mut<'a>(this: &mut Self) -> &mut Self::Parameterized<'a>
unsafe fn shorten_mut<'a>(this: &mut Self) -> &mut Self::Parameterized<'a>
Equivalent to
Stretched::shorten
but operates on a mutable reference to the stretched
type. Read moreSource§unsafe fn shorten_ref<'a>(this: &Self) -> &Self::Parameterized<'a>
unsafe fn shorten_ref<'a>(this: &Self) -> &Self::Parameterized<'a>
Equivalent to
Stretched::shorten
but operates on an immutable reference to the stretched
type. Read moreimpl<T: Copy + ?Sized> Copy for StretchedRef<T>
impl<T: Sync> Send for StretchedRef<T>
impl<T: Sync> Sync for StretchedRef<T>
Auto Trait Implementations§
impl<T> Freeze for StretchedRef<T>where
T: ?Sized,
impl<T> RefUnwindSafe for StretchedRef<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for StretchedRef<T>where
T: ?Sized,
impl<T> UnwindSafe for StretchedRef<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