Struct typestate_automata::DeterministicFiniteAutomata[][src]

pub struct DeterministicFiniteAutomata<State, Transition> where
    State: Eq + Hash + Clone,
    Transition: Eq + Hash + Clone
{ pub states: HashSet<State>, pub initial_states: HashMap<State, HashSet<Transition>>, pub final_states: HashMap<State, HashSet<Transition>>, // some fields omitted }
Expand description

A representation for a deterministic finite automata.

Fields

states: HashSet<State>

Deterministic finite automata states.

initial_states: HashMap<State, HashSet<Transition>>

Deterministic finite automata initial state-indexes.

final_states: HashMap<State, HashSet<Transition>>

Deterministic finite automata final state-indexes.

Implementations

Construct a new deterministic finite automata.

Add a state to the automata.

Add an initial state to the automata.

Add a final state to the automata.

Add a new symbol to the automata alphabet.

Compute the automata productive states.

Compute the automata non-productive states.

This is done by calling DeterministicFiniteAutomata::productive_states and performing a diference against the full state set.

Compute the automata useful states.

Compute the automata non-useful states.

This is done by calling DeterministicFiniteAutomata::useful_states and performing a diference against the full state set.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Implementation of the Default trait for a DeterministicFiniteAutomata.

This function is equivalent to DeterministicFiniteAutomata::new.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.