pub struct RewriteSystem<T: Clone + Eq> {
pub rules: Vec<RewriteRule<T>>,
pub strategy: RewriteStrategy,
}Expand description
A term rewriting system with a collection of rules and a reduction strategy.
Fields§
§rules: Vec<RewriteRule<T>>The set of rewrite rules.
strategy: RewriteStrategyThe reduction strategy to use.
Implementations§
Source§impl<T: Clone + Eq> RewriteSystem<T>
impl<T: Clone + Eq> RewriteSystem<T>
Sourcepub fn new(strategy: RewriteStrategy) -> Self
pub fn new(strategy: RewriteStrategy) -> Self
Creates a new rewrite system with the given strategy.
Sourcepub fn add_rule(&mut self, rule: RewriteRule<T>)
pub fn add_rule(&mut self, rule: RewriteRule<T>)
Adds a rule to the system.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RewriteSystem<T>
impl<T> RefUnwindSafe for RewriteSystem<T>where
T: RefUnwindSafe,
impl<T> Send for RewriteSystem<T>where
T: Send,
impl<T> Sync for RewriteSystem<T>where
T: Sync,
impl<T> Unpin for RewriteSystem<T>where
T: Unpin,
impl<T> UnsafeUnpin for RewriteSystem<T>
impl<T> UnwindSafe for RewriteSystem<T>where
T: 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