pub struct ReductionTrace { /* private fields */ }Expand description
A reduction trace, collecting applied reduction steps.
Implementations§
Source§impl ReductionTrace
impl ReductionTrace
Sourcepub fn record(&mut self, rule: ReductionRule, before: Expr, after: Expr)
pub fn record(&mut self, rule: ReductionRule, before: Expr, after: Expr)
Record a step if tracing is enabled.
Sourcepub fn step_count(&self) -> usize
pub fn step_count(&self) -> usize
Return the number of recorded steps.
Sourcepub fn steps(&self) -> &[ReductionStep]
pub fn steps(&self) -> &[ReductionStep]
Return all recorded steps.
Sourcepub fn count_rule(&self, rule: &ReductionRule) -> usize
pub fn count_rule(&self, rule: &ReductionRule) -> usize
Count steps by rule kind.
Trait Implementations§
Source§impl Debug for ReductionTrace
impl Debug for ReductionTrace
Auto Trait Implementations§
impl !Send for ReductionTrace
impl !Sync for ReductionTrace
impl Forget for ReductionTrace
impl Freeze for ReductionTrace
impl Move for ReductionTrace
impl RefUnwindSafe for ReductionTrace
impl Unpin for ReductionTrace
impl UnsafeUnpin for ReductionTrace
impl UnwindSafe for ReductionTrace
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