Struct stack_graphs::partial::PartialSymbolStack[][src]

#[repr(C)]
pub struct PartialSymbolStack { /* fields omitted */ }
Expand description

A pattern that might match against a symbol stack. Consists of a (possibly empty) list of partial scoped symbols.

(Note that unlike partial scope stacks, we don’t store any “symbol stack variable” here. We could! But with our current path-finding rules, every partial path will always have exactly one symbol stack variable, which will appear at the end of its precondition and postcondition. So for simplicity we just leave it out. At some point in the future we might add it in so that the symbol and scope stack formalisms and implementations are more obviously symmetric.)

Implementations

Returns whether this partial symbol stack is empty.

Returns an empty partial symbol stack.

Pushes a new PartialScopedSymbol onto the front of this partial symbol stack.

Pushes a new PartialScopedSymbol onto the back of this partial symbol stack.

Removes and returns the PartialScopedSymbol at the front of this partial symbol stack. If the stack is empty, returns None.

Removes and returns the PartialScopedSymbol at the back of this partial symbol stack. If the stack is empty, returns None.

Matches this precondition against a symbol stack, stashing away the unmatched portion of the stack in the bindings.

Returns whether two partial symbol stacks “match”. They must be the same length, and each respective partial scoped symbol must match.

Applies a set of bindings to this partial symbol stack, producing a new symbol stack.

Returns an iterator over the contents of this partial symbol stack.

Returns an iterator over the contents of this partial symbol stack, with no guarantee about the ordering of the elements.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Performs the conversion.

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.