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

A pattern that might match against a symbol stack. Consists of a (possibly empty) list of partial scoped symbols, along with an optional symbol stack variable.

Implementations§

Returns whether this partial symbol stack can match the empty symbol stack.

Returns whether this partial symbol stack can only match the empty symbol stack.

Returns whether this partial symbol stack contains any symbols.

Returns an empty partial symbol stack.

Returns a partial symbol stack containing only a symbol stack variable.

Returns whether this partial symbol stack is iterable in both directions without needing mutable access to the arena.

Applies an offset to this partial symbol stack.

When concatenating partial paths, we have to ensure that the left- and right-hand sides have non-overlapping sets of variables. To do this, we find the maximum value of any variable on the left-hand side, and add this “offset” to the values of all of the variables on the right-hand side.

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.

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

Given two partial symbol stacks, returns the largest possible partial symbol stack such that any symbol stack that satisfies the result also satisfies both inputs. This takes into account any existing variable assignments, and updates those variable assignments with whatever constraints are necessary to produce a correct result.

Note that this operation is commutative. (Concatenating partial paths, defined in PartialPath::concatenate, is not.)

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
Converts to this type from the input type.
The type that is used to store values of Self inside of a ControlledOption. This might be Self itself, if your niche is a valid instance of the type, but which violates some runtime constraint. But if you cannot easily create your niche as an instance of Self, you can use some other type, you can use some other type instead. Read more
Returns the niche value for this type that should be used to represent None for a ControlledOption.
Returns whether value is the niche value for this type.
Transforms a non-niche value of this type into its Output type. When Output is Self, this will be the identity function.
Transforms a non-niche value of this type from its Output type. When Output is Self, this will be the identity function.

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
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. 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.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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
Attempts to convert self into T using TryInto<T>. 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.