Struct leak_playground_std::marker::Unforget
source · #[repr(transparent)]pub struct Unforget<'a, T: ?Sized> {
_unforget: PhantomStaticUnforget,
_anchor: PhantomData<fn(_: &'a ())>,
inner: T,
}
Expand description
A transparent wrapper to make your types !Forget
Fields§
§_unforget: PhantomStaticUnforget
§_anchor: PhantomData<fn(_: &'a ())>
Inner value must be able to outlive this lifetime to be able to
be forgotten. Of course it is contravariant, since expanding it
may only disable the Forget
implementation.
inner: T
Implementations§
source§impl<'a, T> Unforget<'a, T>
impl<'a, T> Unforget<'a, T>
pub fn with_lifetime(inner: T) -> Self
sourcepub fn into_inner(slot: Self) -> T
pub fn into_inner(slot: Self) -> T
Get inner value.
Trait Implementations§
source§impl<'a, T: PartialEq + ?Sized> PartialEq for Unforget<'a, T>
impl<'a, T: PartialEq + ?Sized> PartialEq for Unforget<'a, T>
source§impl<'a, T: PartialOrd + ?Sized> PartialOrd for Unforget<'a, T>
impl<'a, T: PartialOrd + ?Sized> PartialOrd for Unforget<'a, T>
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, T: Copy + ?Sized> Copy for Unforget<'a, T>
impl<'a, T: Eq + ?Sized> Eq for Unforget<'a, T>
impl<'a, T: ?Sized + 'a> Forget for Unforget<'a, T>
impl<'a, T: ?Sized> StructuralPartialEq for Unforget<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Unforget<'a, T>
impl<'a, T> RefUnwindSafe for Unforget<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> Send for Unforget<'a, T>
impl<'a, T> Sync for Unforget<'a, T>
impl<'a, T> Unpin for Unforget<'a, T>
impl<'a, T> UnwindSafe for Unforget<'a, T>where
T: UnwindSafe + ?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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more