pub enum MatchInfo {
Unconditional {
vertex: usize,
},
Incoming {
vertex: usize,
sources: Vec<usize>,
},
Outgoing {
vertex: usize,
targets: Vec<usize>,
},
Swap {
vertex: usize,
other: usize,
},
}Expand description
Context captured during rule matching, passed to apply().
Carries the vertex where the rule fires and any additional context
the action needs (incoming neighbors, outgoing neighbors, swap
target). This avoids double-scanning the state and guarantees
that apply() uses the same match data that matches() found.
Variants§
Unconditional
Rule fires unconditionally at this vertex.
Incoming
Rule fires at vertex, using these specific incoming neighbors.
Outgoing
Rule fires at vertex, using these specific outgoing neighbors.
Swap
Rule fires at vertex, swapping with this specific neighbor.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MatchInfo
impl RefUnwindSafe for MatchInfo
impl Send for MatchInfo
impl Sync for MatchInfo
impl Unpin for MatchInfo
impl UnsafeUnpin for MatchInfo
impl UnwindSafe for MatchInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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