Struct stack_graphs::paths::Path

source ·
#[repr(C)]
pub struct Path { pub start_node: Handle<Node>, pub end_node: Handle<Node>, pub symbol_stack: SymbolStack, pub scope_stack: ScopeStack, pub edges: PathEdgeList, }
Expand description

A sequence of edges from a stack graph. A complete path represents a full name binding in a source language.

Fields§

§start_node: Handle<Node>§end_node: Handle<Node>§symbol_stack: SymbolStack§scope_stack: ScopeStack§edges: PathEdgeList

Implementations§

Promotes a partial path to a path.

Attempts to append a partial path to the end of a path. If the partial path is not compatible with this path, we return an error describing why.

Creates a new empty path starting at a stack graph node. The starting node cannot be a pop symbol node.

Returns whether one path shadows another. Note that shadowing is not commutative — if path A shadows path B, the reverse is not true.

A complete path represents a full name binding that resolves a reference to a definition.

Attempts to append an edge to the end of a path. If the edge is not a valid extension of this path, we return an error describing why.

Attempts to resolve any jump to scope node at the end of a path. If the path does not end in a jump to scope node, we do nothing. If it does, and we cannot resolve it, then we return an error describing why.

Attempts to extend one path as part of the path-finding algorithm. When calling this function, you are responsible for ensuring that graph already contains data for all of the possible edges that we might want to extend path with.

The resulting extended paths will be added to result. We have you pass that in as a parameter, instead of building it up ourselves, so that you have control over which particular collection type to use, and so that you can reuse result collections across multiple calls.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. 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
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.