[−][src]Struct winnow_sm::Nodes
Containing structure for all nodes Nodes are registered in sequential order
Fields
current_node: usizeCurrent node tracker
env: EnvUser-defined mapping of names to values
internal_state: usizeInternal state tracker
nodes: Vec<Node>Array (actually variable-sized heap-allocated vector) of nodes
Methods
impl Nodes[src]
pub fn new(specified_input: Option<String>) -> Self[src]
Constructor will parse specified file or input.txt if None
pub fn run(&mut self)[src]
Execute machine
fn register_question_node(
&mut self,
if_answered: usize,
if_terminate: usize,
variable_name: &str,
questions: Vec<String>
)[src]
&mut self,
if_answered: usize,
if_terminate: usize,
variable_name: &str,
questions: Vec<String>
)
Add a question node to the set
fn register_branching_node(
&mut self,
variable_name: &str,
question: &str,
options: Vec<(String, usize)>
)[src]
&mut self,
variable_name: &str,
question: &str,
options: Vec<(String, usize)>
)
Add a branching node to the set
fn register_terminating_node(&mut self, text: &str)[src]
Add a terminating node to the set
fn read_and_register(&mut self, parsed: Pair<Rule>)[src]
Catch-all to register a parsed node
fn state_transition(&mut self, new_state: usize)[src]
State transition
Trait Implementations
impl Default for Nodes[src]
impl PartialEq<Nodes> for Nodes[src]
impl Debug for Nodes[src]
impl Display for Nodes[src]
Auto Trait Implementations
impl Send for Nodes
impl Unpin for Nodes
impl Sync for Nodes
impl UnwindSafe for Nodes
impl RefUnwindSafe for Nodes
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,