pub(crate) struct NonConstLengthsStack {
data: Vec<BranchMeta>,
}
Expand description
A data structure that holds any number of BranchMeta
items.
Fields§
§data: Vec<BranchMeta>
Implementations§
source§impl NonConstLengthsStack
impl NonConstLengthsStack
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new empty NonConstLengthsStack
.
sourcepub fn push(&mut self, meta: BranchMeta)
pub fn push(&mut self, meta: BranchMeta)
Adds a BranchMeta
to the stack.
sourcepub fn peek_or_panic(&self) -> BranchMeta
pub fn peek_or_panic(&self) -> BranchMeta
Returns a copy of the BranchMeta
on the top of the stack, panicking if
the stack is empty.
sourcepub fn pop_many_or_panic(
&mut self,
len: usize,
) -> ConstArrayBuilder<256, BranchMeta>
pub fn pop_many_or_panic( &mut self, len: usize, ) -> ConstArrayBuilder<256, BranchMeta>
Removes many BranchMeta
s from the stack, returning them in a ConstArrayBuilder
.
sourcefn as_slice(&self) -> &[BranchMeta]
fn as_slice(&self) -> &[BranchMeta]
Non-const function that returns the initialized elements as a slice.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NonConstLengthsStack
impl RefUnwindSafe for NonConstLengthsStack
impl Send for NonConstLengthsStack
impl Sync for NonConstLengthsStack
impl Unpin for NonConstLengthsStack
impl UnwindSafe for NonConstLengthsStack
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