[][src]Struct throne::State

pub struct State {
    pub first_atoms: Vec<(usize, Atom)>,
    // some fields omitted
}

Fields

first_atoms: Vec<(usize, Atom)>

Methods

impl State[src]

pub fn new() -> State[src]

pub fn remove(&mut self, id: PhraseId)[src]

pub fn update_first_atoms(&mut self)[src]

pub fn remove_phrase(&mut self, phrase: &Phrase)[src]

pub fn shuffle(&mut self, rng: &mut SmallRng)[src]

pub fn push(&mut self, phrase: Vec<Token>) -> PhraseId[src]

pub fn len(&self) -> usize[src]

pub fn iter<'a>(&'a self) -> impl Iterator<Item = PhraseId> + 'a[src]

pub fn get(&self, id: PhraseId) -> &Phrase[src]

pub fn get_all(&self) -> Vec<Vec<Token>>[src]

pub fn from_phrases(phrases: &[Vec<Token>]) -> State[src]

pub fn lock_scratch(&mut self)[src]

pub fn unlock_scratch(&mut self)[src]

pub fn reset_scratch(&mut self)[src]

Trait Implementations

impl Clone for State[src]

impl Debug for State[src]

impl Display for State[src]

impl Index<usize> for State[src]

type Output = [Token]

The returned type after indexing.

Auto Trait Implementations

impl RefUnwindSafe for State

impl Send for State

impl Sync for State

impl Unpin for State

impl UnwindSafe for State

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.