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
Source§impl Default for ReductionTrace
impl Default for ReductionTrace
Source§fn default() -> ReductionTrace
fn default() -> ReductionTrace
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReductionTrace
impl RefUnwindSafe for ReductionTrace
impl Send for ReductionTrace
impl Sync 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