Skip to main content

Stack

Struct Stack 

Source
pub struct Stack {
    pub nodes: Vec<SNode>,
    pub heads: Vec<Head>,
    /* private fields */
}

Fields§

§nodes: Vec<SNode>§heads: Vec<Head>

Implementations§

Source§

impl Stack

Source

pub fn new() -> Stack

Source

pub fn clear(&mut self)

Source

pub fn version_count(&self) -> usize

Source

pub fn state(&self, v: usize) -> u16

Source

pub fn position(&self, v: usize) -> Len

Source

pub fn is_active(&self, v: usize) -> bool

Source

pub fn is_halted(&self, v: usize) -> bool

Source

pub fn is_paused(&self, v: usize) -> bool

Source

pub fn halt(&mut self, v: usize)

Source

pub fn dynamic_precedence(&self, v: usize) -> i32

Source

pub fn halted_count(&self) -> usize

Source

pub fn error_cost(&self, v: usize) -> u32

Source

pub fn node_count_since_error(&mut self, v: usize) -> u32

Source

pub fn push( &mut self, a: &Arena, v: usize, tree: u32, pending: bool, state: u16, )

Source

pub fn can_merge(&self, v1: usize, v2: usize) -> bool

Source

pub fn merge(&mut self, a: &Arena, v1: usize, v2: usize) -> bool

Source

pub fn remove_version(&mut self, v: usize)

Source

pub fn renumber_version(&mut self, v1: usize, v2: usize)

Source

pub fn swap_versions(&mut self, v1: usize, v2: usize)

Source

pub fn copy_version(&mut self, v: usize) -> usize

Source

pub fn pause(&mut self, v: usize, lookahead: u32)

Source

pub fn resume(&mut self, v: usize) -> u32

Source

pub fn has_advanced_since_error(&self, a: &Arena, v: usize) -> bool

Source

pub fn pop_count(&mut self, a: &Arena, v: usize, count: u32) -> Vec<Slice>

Source

pub fn pop_all(&mut self, a: &Arena, v: usize) -> Vec<Slice>

Source

pub fn pop_error(&mut self, a: &Arena, v: usize) -> Vec<u32>

Source

pub fn record_summary(&mut self, a: &Arena, v: usize, max_depth: u32)

Trait Implementations§

Source§

impl Default for Stack

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for Stack

§

impl Freeze for Stack

§

impl Move for Stack

§

impl RefUnwindSafe for Stack

§

impl Send for Stack

§

impl Sync for Stack

§

impl Unpin for Stack

§

impl UnsafeUnpin for Stack

§

impl UnwindSafe for Stack

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.