Struct peepmatic_automata::Automaton[][src]

pub struct Automaton<TAlphabet, TState, TOutput> where
    TAlphabet: Clone + Eq + Hash + Ord,
    TState: Clone + Eq + Hash,
    TOutput: Output
{ /* fields omitted */ }
Expand description

A finite-state transducer automata.

These are constructed via Builder.

An Automaton is immutable: new entries cannot be inserted and existing entries cannot be removed.

To query an Automaton, there are two APIs:

  1. get – a high-level method to get the associated output value of a full input sequence.

  2. query – a low-level method to incrementally query the automata. It does not require that you have the full input sequence on hand all at once, only the next character. It also allows you to process the output as it it built up, rather than only at giving you the final, complete output value.

Implementations

Get the output value associated with the given input sequence.

Returns None if the input sequence is not a member of this Automaton’s keys. Otherwise, returns Some(output).

Create a low-level query.

This allows you to incrementally query this Automaton, without providing the full input sequence ahead of time, and also incrementally build up the output.

See Query for details.

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

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.