pub struct Stack(/* private fields */);
Expand description
A Stack that is managed separately from the threadlocal one. Typically, using the threadlocal APIs is encouraged because they enable sharing across libraries, where each re-use lowers the amortized cost of maintaining allocations. But, if full control is necessary this API may be used.
Implementations§
Source§impl Stack
impl Stack
pub fn new() -> Self
Sourcepub fn uninit<T, R, F>(&self, f: F) -> Rwhere
F: FnOnce(&mut MaybeUninit<T>) -> R,
pub fn uninit<T, R, F>(&self, f: F) -> Rwhere
F: FnOnce(&mut MaybeUninit<T>) -> R,
Place a potentially very large value on this stack.
Sourcepub fn uninit_slice<T, F, R>(&self, len: usize, f: F) -> Rwhere
F: FnOnce(&mut [MaybeUninit<T>]) -> R,
pub fn uninit_slice<T, F, R>(&self, len: usize, f: F) -> Rwhere
F: FnOnce(&mut [MaybeUninit<T>]) -> R,
Allocates an uninit slice from this stack.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Stack
impl !RefUnwindSafe for Stack
impl !Send for Stack
impl !Sync for Stack
impl Unpin for Stack
impl UnwindSafe for Stack
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