pub struct Stack<T, const N: usize = 128> { /* private fields */ }Expand description
Bounded-capacity stack with const fn operations. Used to store syntax spans
via Syntax type alias.
Implementations§
Source§impl<T, const N: usize> Stack<T, N>
impl<T, const N: usize> Stack<T, N>
Sourcepub fn iter(
&self,
) -> impl ExactSizeIterator<Item = &T> + DoubleEndedIterator + '_
pub fn iter( &self, ) -> impl ExactSizeIterator<Item = &T> + DoubleEndedIterator + '_
Iterates over elements in this stack in the order of their insertion.
Trait Implementations§
Source§impl<'a, T, const N: usize> IntoIterator for &'a Stack<T, N>
impl<'a, T, const N: usize> IntoIterator for &'a Stack<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for Stack<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for Stack<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for Stack<T, N>where
T: Send,
impl<T, const N: usize> Sync for Stack<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for Stack<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for Stack<T, N>where
T: UnwindSafe,
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