pub struct EtaRewriteEngine { /* private fields */ }Expand description
A simple eta rewrite engine that applies a set of rules iteratively.
Implementations§
Source§impl EtaRewriteEngine
impl EtaRewriteEngine
Sourcepub fn new(proj_rules: ProjectionRewriteSet, max_steps: u32) -> Self
pub fn new(proj_rules: ProjectionRewriteSet, max_steps: u32) -> Self
Create a new engine with the given rule set.
Sourcepub fn steps_taken(&self) -> u32
pub fn steps_taken(&self) -> u32
Return the number of steps taken so far.
Sourcepub fn is_exhausted(&self) -> bool
pub fn is_exhausted(&self) -> bool
Return whether the engine has reached its step limit.
Sourcepub fn apply_proj(&mut self, projector: &str) -> Option<u32>
pub fn apply_proj(&mut self, projector: &str) -> Option<u32>
Try to apply a projection rule for the given projector name.
Returns Some(field_index) if a rule applies, else None.
Sourcepub fn rule_count(&self) -> usize
pub fn rule_count(&self) -> usize
Return the number of projection rules available.
Auto Trait Implementations§
impl Freeze for EtaRewriteEngine
impl RefUnwindSafe for EtaRewriteEngine
impl Send for EtaRewriteEngine
impl Sync for EtaRewriteEngine
impl Unpin for EtaRewriteEngine
impl UnsafeUnpin for EtaRewriteEngine
impl UnwindSafe for EtaRewriteEngine
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