Struct second_stack::Stack
source · [−]pub struct Stack(_);
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
sourceimpl Stack
impl Stack
pub fn new() -> Self
sourcepub fn uninit<T, R, F>(&self, f: F) -> R where
F: FnOnce(&mut MaybeUninit<T>) -> R,
pub fn uninit<T, R, F>(&self, f: F) -> R where
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) -> R where
F: FnOnce(&mut [MaybeUninit<T>]) -> R,
pub fn uninit_slice<T, F, R>(&self, len: usize, f: F) -> R where
F: FnOnce(&mut [MaybeUninit<T>]) -> R,
Allocates an uninit slice from this stack.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Stack
impl !Send for Stack
impl !Sync for Stack
impl Unpin for Stack
impl UnwindSafe for Stack
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more