Struct stack_graphs::partial::PartialScopeStack [−][src]
#[repr(C)]pub struct PartialScopeStack { /* fields omitted */ }
Expand description
A pattern that might match against a scope stack. Consists of a (possibly empty) list of exported scopes, along with an optional scope stack variable.
Implementations
Returns whether this partial scope stack can only match the empty scope stack.
Returns whether this partial scope stack contains any scopes.
Returns an empty partial scope stack.
Returns a partial scope stack containing only a scope stack variable.
pub fn match_stack(
&self,
stack: ScopeStack,
bindings: &mut ScopeStackBindings
) -> Result<(), PathResolutionError>
pub fn match_stack(
&self,
stack: ScopeStack,
bindings: &mut ScopeStackBindings
) -> Result<(), PathResolutionError>
Matches this partial scope stack against a scope stack, unifying any scope stack variables with an existing set of bindings.
Returns whether two partial scope stacks match exactly the same set of scope stacks.
pub fn apply_bindings(
self,
paths: &mut Paths,
partials: &mut PartialPaths,
bindings: &ScopeStackBindings
) -> Result<ScopeStack, PathResolutionError>
pub fn apply_bindings(
self,
paths: &mut Paths,
partials: &mut PartialPaths,
bindings: &ScopeStackBindings
) -> Result<ScopeStack, PathResolutionError>
Applies a set of scope stack bindings to this partial scope stack, producing a new scope stack.
Pushes a new Node
onto the front of this partial scope stack. The node must be an
exported scope node.
Pushes a new Node
onto the back of this partial scope stack. The node must be an
exported scope node.
Removes and returns the Node
at the front of this partial scope stack. If the stack
does not contain any exported scope nodes, returns None
.
Removes and returns the Node
at the back of this partial scope stack. If the stack
does not contain any exported scope nodes, returns None
.
Returns the scope stack variable at the end of this partial scope stack. If the stack does
not contain a scope stack variable, returns None
.
pub fn iter_scopes<'a>(
&self,
partials: &'a mut PartialPaths
) -> impl Iterator<Item = Handle<Node>> + 'a
pub fn iter_scopes<'a>(
&self,
partials: &'a mut PartialPaths
) -> impl Iterator<Item = Handle<Node>> + 'a
Returns an iterator over the scopes in this partial scope stack.
pub fn iter_unordered<'a>(
&self,
partials: &'a PartialPaths
) -> impl Iterator<Item = Handle<Node>> + 'a
pub fn iter_unordered<'a>(
&self,
partials: &'a PartialPaths
) -> impl Iterator<Item = Handle<Node>> + 'a
Returns an iterator over the contents of this partial scope stack, with no guarantee about the ordering of the elements.
pub fn display<'a>(
self,
graph: &'a StackGraph,
partials: &'a mut PartialPaths
) -> impl Display + 'a
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for PartialScopeStack
impl Send for PartialScopeStack
impl Sync for PartialScopeStack
impl Unpin for PartialScopeStack
impl UnwindSafe for PartialScopeStack
Blanket Implementations
Mutably borrows from an owned value. Read more