pub struct Slot<'frame, T>(_);
Expand description
An empty slot on the stack into which a value could be emplaced.
The 'frame
lifetime refers to the lifetime of the stack frame this
Slot
’s storage is allocated on.
See slot!()
.
impl<'frame, T> Slot<'frame, T>
Creates a new Slot
with the given pointer as its basis.
To safely construct a Slot
, use slot!()
.
ptr
must not be outlived by any other pointers to its allocation.
Put val
into this slot, returning a new MoveRef
.
Pin val
into this slot, returning a new, pinned MoveRef
.
Emplace new
into this slot, returning a new, pinned MoveRef
.
Try to emplace new
into this slot, returning a new, pinned MoveRef
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.