Struct stack_graphs::partial::PartialScopedSymbol [−][src]
#[repr(C)]pub struct PartialScopedSymbol {
pub symbol: Handle<Symbol>,
pub scopes: ControlledOption<PartialScopeStack>,
}
Expand description
A symbol with an unknown, but possibly empty, list of exported scopes attached to it.
Fields
symbol: Handle<Symbol>
scopes: ControlledOption<PartialScopeStack>
Implementations
Applies an offset to this scoped symbol.
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.
pub fn match_symbol(
self,
graph: &StackGraph,
symbol: ScopedSymbol,
scope_bindings: &mut ScopeStackBindings
) -> Result<(), PathResolutionError>
pub fn match_symbol(
self,
graph: &StackGraph,
symbol: ScopedSymbol,
scope_bindings: &mut ScopeStackBindings
) -> Result<(), PathResolutionError>
Matches this precondition symbol against a scoped symbol, unifying its contents with an existing set of bindings.
pub fn unify(
&mut self,
partials: &mut PartialPaths,
rhs: PartialScopedSymbol,
scope_bindings: &mut PartialScopeStackBindings
) -> Result<(), PathResolutionError>
pub fn unify(
&mut self,
partials: &mut PartialPaths,
rhs: PartialScopedSymbol,
scope_bindings: &mut PartialScopeStackBindings
) -> Result<(), PathResolutionError>
Matches this precondition symbol against another, unifying its contents with an existing set of bindings.
Returns whether two partial scoped symbols “match”. The symbols must be identical, and any attached scopes must also match.
pub fn apply_bindings(
self,
paths: &mut Paths,
partials: &mut PartialPaths,
scope_bindings: &ScopeStackBindings
) -> Result<ScopedSymbol, PathResolutionError>
pub fn apply_bindings(
self,
paths: &mut Paths,
partials: &mut PartialPaths,
scope_bindings: &ScopeStackBindings
) -> Result<ScopedSymbol, PathResolutionError>
Applies a set of bindings to this partial scoped symbol, producing a new scoped symbol.
pub fn apply_partial_bindings(
self,
partials: &mut PartialPaths,
scope_bindings: &PartialScopeStackBindings
) -> Result<PartialScopedSymbol, PathResolutionError>
pub fn apply_partial_bindings(
self,
partials: &mut PartialPaths,
scope_bindings: &PartialScopeStackBindings
) -> Result<PartialScopedSymbol, PathResolutionError>
Applies a set of bindings to this partial scoped symbol, producing a new scoped symbol.
pub fn cmp(
&self,
graph: &StackGraph,
partials: &mut PartialPaths,
other: &PartialScopedSymbol
) -> Ordering
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 PartialScopedSymbol
impl Send for PartialScopedSymbol
impl Sync for PartialScopedSymbol
impl Unpin for PartialScopedSymbol
impl UnwindSafe for PartialScopedSymbol
Blanket Implementations
Mutably borrows from an owned value. Read more