pub struct Stack<const SIZE: usize> { /* private fields */ }Expand description
Data type for a properly aligned stack of N 32-bit (usize) words
Implementations§
Source§impl<const SIZE: usize> Stack<SIZE>
impl<const SIZE: usize> Stack<SIZE>
Sourcepub const fn new() -> Stack<SIZE>
pub const fn new() -> Stack<SIZE>
Construct a stack of length SIZE, initialized to 0
The minimum allowed SIZE is 64 bytes, but most programs will need a significantly larger stack.
Sourcepub fn take(&self) -> Option<StackAllocation>
pub fn take(&self) -> Option<StackAllocation>
Take the StackAllocation out of this Stack.
This returns None if the stack is already taken.
Trait Implementations§
impl<const SIZE: usize> Sync for Stack<SIZE>
Auto Trait Implementations§
impl<const SIZE: usize> !Freeze for Stack<SIZE>
impl<const SIZE: usize> !RefUnwindSafe for Stack<SIZE>
impl<const SIZE: usize> Send for Stack<SIZE>
impl<const SIZE: usize> Unpin for Stack<SIZE>
impl<const SIZE: usize> UnsafeUnpin for Stack<SIZE>
impl<const SIZE: usize> UnwindSafe for Stack<SIZE>
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more