pub struct PatternCfg<P>where
P: PatternProvider,{
pub entry: NodeIndex,
pub graph: Graph<CfgNodeKind<P::CfgVariable>, CfgEdge<P>>,
pub leaves: HashMap<usize, NodeIndex>,
pub leaf_bindings: HashMap<NodeIndex, HashMap<P::CfgVariable, P::PatternNodeKey>>,
}
Fields§
§entry: NodeIndex
§graph: Graph<CfgNodeKind<P::CfgVariable>, CfgEdge<P>>
§leaves: HashMap<usize, NodeIndex>
§leaf_bindings: HashMap<NodeIndex, HashMap<P::CfgVariable, P::PatternNodeKey>>
Implementations§
Source§impl<P> PatternCfg<P>where
P: PatternProvider,
impl<P> PatternCfg<P>where
P: PatternProvider,
Source§impl<P> PatternCfg<P>where
P: PatternProvider,
impl<P> PatternCfg<P>where
P: PatternProvider,
pub fn new() -> Self
pub fn add_fail(&mut self) -> NodeIndex
pub fn add_leaf(&mut self, num: usize) -> NodeIndex
pub fn get_entry(&self) -> NodeIndex
pub fn add_node(&mut self, var: P::CfgVariable) -> NodeIndex
pub fn add_edge( &mut self, parent: NodeIndex, child: NodeIndex, edge: CfgEdge<P>, )
pub fn add_child( &mut self, parent: NodeIndex, typ: CfgEdge<P>, var: P::CfgVariable, ) -> NodeIndex
Trait Implementations§
Source§impl<P> Clone for PatternCfg<P>
impl<P> Clone for PatternCfg<P>
Source§fn clone(&self) -> PatternCfg<P>
fn clone(&self) -> PatternCfg<P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P> Debug for PatternCfg<P>
impl<P> Debug for PatternCfg<P>
Auto Trait Implementations§
impl<P> Freeze for PatternCfg<P>
impl<P> RefUnwindSafe for PatternCfg<P>where
<P as PatternProvider>::CfgVariable: RefUnwindSafe,
<P as PatternProvider>::PatternNodeKind: RefUnwindSafe,
<P as PatternProvider>::PatternNodeKey: RefUnwindSafe,
impl<P> Send for PatternCfg<P>where
<P as PatternProvider>::CfgVariable: Send,
<P as PatternProvider>::PatternNodeKind: Send,
<P as PatternProvider>::PatternNodeKey: Send,
impl<P> Sync for PatternCfg<P>where
<P as PatternProvider>::CfgVariable: Sync,
<P as PatternProvider>::PatternNodeKind: Sync,
<P as PatternProvider>::PatternNodeKey: Sync,
impl<P> Unpin for PatternCfg<P>where
<P as PatternProvider>::CfgVariable: Unpin,
<P as PatternProvider>::PatternNodeKind: Unpin,
<P as PatternProvider>::PatternNodeKey: Unpin,
impl<P> UnwindSafe for PatternCfg<P>where
<P as PatternProvider>::CfgVariable: UnwindSafe,
<P as PatternProvider>::PatternNodeKey: UnwindSafe,
<P as PatternProvider>::PatternNodeKind: UnwindSafe,
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