pub struct MatchResult {
pub wires: Vec<(String, WireSource)>,
pub constants: Vec<(String, Vec<u64>)>,
pub typed_constants: Vec<(String, Vec<ConstValue>)>,
pub consumed_nodes: Vec<usize>,
}Expand description
The result of a successful pattern match against a subgraph.
Fields§
§wires: Vec<(String, WireSource)>Bound wire sources: bind_name → WireSource for each Any leaf.
constants: Vec<(String, Vec<u64>)>Bound node constants (JIT u64 form): bind_name → jit_constants().
typed_constants: Vec<(String, Vec<ConstValue>)>Bound typed constants from the slot model. Empty for nodes not yet migrated to slots.
consumed_nodes: Vec<usize>The set of node indices consumed by this match. These nodes will be removed from the DAG and replaced by the fused node.
Implementations§
Source§impl MatchResult
impl MatchResult
Sourcepub fn wire(&self, name: &str) -> &WireSource
pub fn wire(&self, name: &str) -> &WireSource
Look up a captured wire by binding name.
Sourcepub fn const_vec(&self, name: &str) -> &[u64]
pub fn const_vec(&self, name: &str) -> &[u64]
Look up captured constants (u64 form) by binding name.
Sourcepub fn typed_consts(&self, name: &str) -> &[ConstValue]
pub fn typed_consts(&self, name: &str) -> &[ConstValue]
Look up typed constants by binding name.
Trait Implementations§
Source§impl Clone for MatchResult
impl Clone for MatchResult
Source§fn clone(&self) -> MatchResult
fn clone(&self) -> MatchResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MatchResult
impl RefUnwindSafe for MatchResult
impl Send for MatchResult
impl Sync for MatchResult
impl Unpin for MatchResult
impl UnsafeUnpin for MatchResult
impl UnwindSafe for MatchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more