pub struct LinearPrefix<S, W> { /* private fields */ }Expand description
Mutable view of a linear top prefix over an unchanged hidden floor.
The hidden floor may still be branched. Use Self::floor_is_empty to test
whether the prefix represents one complete concrete stack.
Implementations§
Source§impl<S, W> LinearPrefix<S, W>
impl<S, W> LinearPrefix<S, W>
Sourcepub fn get(&self, depth_from_top: usize) -> Option<&S>
pub fn get(&self, depth_from_top: usize) -> Option<&S>
Return a visible value by depth from the top.
Sourcepub fn floor_is_empty(&self) -> bool
pub fn floor_is_empty(&self) -> bool
Return whether the hidden floor is exactly the empty stack.
Sourcepub fn popn(&mut self, count: usize) -> usize
pub fn popn(&mut self, count: usize) -> usize
Pop values from the prefix and return the number that reached its floor.
Sourcepub fn into_gss(self) -> WeightedGss<S, W>
pub fn into_gss(self) -> WeightedGss<S, W>
Convert the view back into a weighted GSS.
Trait Implementations§
Auto Trait Implementations§
impl<S, W> Freeze for LinearPrefix<S, W>where
S: Freeze,
impl<S, W> RefUnwindSafe for LinearPrefix<S, W>where
W: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, W> Send for LinearPrefix<S, W>
impl<S, W> Sync for LinearPrefix<S, W>
impl<S, W> Unpin for LinearPrefix<S, W>where
S: Unpin,
impl<S, W> UnsafeUnpin for LinearPrefix<S, W>where
S: UnsafeUnpin,
impl<S, W> UnwindSafe for LinearPrefix<S, W>
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