pub struct DataStackToken(/* private fields */);Expand description
Marker of a stack position, taken with DataStack::store.
Passing it to DataStack::restore unwinds everything pushed after it,
running the drop function of every value on the way. Passing it to
DataStack::reverse flips the order of those items instead.
Implementations§
Source§impl DataStackToken
impl DataStackToken
Sourcepub unsafe fn new(position: usize) -> DataStackToken
pub unsafe fn new(position: usize) -> DataStackToken
Builds a token pointing at an arbitrary position.
§Safety
position must be a real item boundary of the stack it will be used
with. Restoring to a position inside a value leaves the stack reading
garbage as type tags.
Auto Trait Implementations§
impl Freeze for DataStackToken
impl RefUnwindSafe for DataStackToken
impl Send for DataStackToken
impl Sync for DataStackToken
impl Unpin for DataStackToken
impl UnsafeUnpin for DataStackToken
impl UnwindSafe for DataStackToken
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