#[repr(C, align(16))]pub struct Stack<const SIZE: usize> {
pub mem: MaybeUninit<[u8; SIZE]>,
}
Available on crate feature
unstable
only.Expand description
Data type for a properly aligned stack of N bytes
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Fields§
§mem: MaybeUninit<[u8; SIZE]>
Memory to be used for the stack
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, uninitialized
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub const fn len(&self) -> usize
pub const fn len(&self) -> usize
Returns the length of the stack in bytes.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.