pub enum TrieNode {
    Decision {
        edges: Vec<TrieEdge>,
    },
    Leaf {
        prio: Prio,
        output: ExprSequence,
    },
    Empty,
}
Expand description

A node in the term trie.

Variants

Decision

Fields

edges: Vec<TrieEdge>

The child sub-tries that we can match from this point on.

One or more patterns could match.

Maybe one pattern already has matched, but there are more (higher priority and/or same priority but more specific) patterns that could still match.

Leaf

Fields

prio: Prio

The priority of this rule.

output: ExprSequence

The RHS expression to evaluate upon a successful LHS pattern match.

The successful match of an LHS pattern, and here is its RHS expression.

Empty

No LHS pattern matches.

Implementations

Sort edges by priority.

Get a pretty-printed version of this trie, for debugging.

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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.