#[repr(C)]pub struct TaggedStack {
pub base: *mut u64,
pub sp: usize,
pub capacity: usize,
}Expand description
Stack state for the tagged value stack
Fields§
§base: *mut u64Pointer to the base of the stack array
sp: usizeCurrent stack pointer (index into array, points to next free slot)
capacity: usizeTotal capacity of the stack (number of slots)
Implementations§
Source§impl TaggedStack
impl TaggedStack
Sourcepub fn new(capacity: usize) -> TaggedStack
pub fn new(capacity: usize) -> TaggedStack
Create a new tagged stack with the given capacity
Sourcepub fn with_default_capacity() -> TaggedStack
pub fn with_default_capacity() -> TaggedStack
Create a new tagged stack with default capacity
Sourcepub fn has_capacity(&self, n: usize) -> bool
pub fn has_capacity(&self, n: usize) -> bool
Check if the stack has room for n more values
Sourcepub fn clone_stack(&self) -> TaggedStack
pub fn clone_stack(&self) -> TaggedStack
Clone this stack (for spawn)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaggedStack
impl RefUnwindSafe for TaggedStack
impl !Send for TaggedStack
impl !Sync for TaggedStack
impl Unpin for TaggedStack
impl UnsafeUnpin for TaggedStack
impl UnwindSafe for TaggedStack
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