Struct term_rewriting::RuleContext [−][src]
Fields
lhs: Context
rhs: Vec<Context>
Methods
impl RuleContext
[src]
impl RuleContext
pub fn pretty(&self, sig: &Signature) -> String
[src]
pub fn pretty(&self, sig: &Signature) -> String
A human-readable serialization of the RuleContext
.
pub fn subcontexts(&self) -> Vec<(&Context, Place)>
[src]
pub fn subcontexts(&self) -> Vec<(&Context, Place)>
Get all the subcontexts and Place
s in a RuleContext
.
pub fn holes(&self) -> Vec<Place>
[src]
pub fn holes(&self) -> Vec<Place>
pub fn variables(&self) -> Vec<Variable>
[src]
pub fn variables(&self) -> Vec<Variable>
All the Variables
in a RuleContext
.
pub fn operators(&self) -> Vec<Operator>
[src]
pub fn operators(&self) -> Vec<Operator>
All the Operators
in a RuleContext
.
pub fn at(&self, p: &[usize]) -> Option<&Context>
[src]
pub fn at(&self, p: &[usize]) -> Option<&Context>
Get a specific subcontext in a RuleContext
.
pub fn replace(
&self,
place: &[usize],
subcontext: Context
) -> Option<RuleContext>
[src]
pub fn replace(
&self,
place: &[usize],
subcontext: Context
) -> Option<RuleContext>
Replace one subcontext with another in a RuleContext
.
pub fn to_rule(&self) -> Result<Rule, ()>
[src]
pub fn to_rule(&self) -> Result<Rule, ()>
Convert a RuleContext
to a Rule
if possible.
Trait Implementations
impl Debug for RuleContext
[src]
impl Debug for RuleContext
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RuleContext
[src]
impl Clone for RuleContext
fn clone(&self) -> RuleContext
[src]
fn clone(&self) -> RuleContext
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for RuleContext
[src]
impl PartialEq for RuleContext
fn eq(&self, other: &RuleContext) -> bool
[src]
fn eq(&self, other: &RuleContext) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RuleContext) -> bool
[src]
fn ne(&self, other: &RuleContext) -> bool
This method tests for !=
.
impl Eq for RuleContext
[src]
impl Eq for RuleContext
impl Hash for RuleContext
[src]
impl Hash for RuleContext
Auto Trait Implementations
impl Send for RuleContext
impl Send for RuleContext
impl Sync for RuleContext
impl Sync for RuleContext