pub struct RewriteStats {
pub steps: usize,
pub rule_applications: usize,
pub rule_counts: HashMap<String, usize>,
pub reached_fixpoint: bool,
pub cycle_detected: bool,
pub size_limit_exceeded: bool,
pub initial_size: usize,
pub final_size: usize,
}Expand description
Statistics about a rewriting session.
Fields§
§steps: usizeTotal number of rewrite steps performed
rule_applications: usizeNumber of successful rule applications
rule_counts: HashMap<String, usize>Per-rule application counts
reached_fixpoint: boolWhether a fixpoint was reached
cycle_detected: boolWhether cycle detection triggered
size_limit_exceeded: boolWhether size limit was exceeded
initial_size: usizeInitial expression size
final_size: usizeFinal expression size
Implementations§
Source§impl RewriteStats
impl RewriteStats
Sourcepub fn reduction_percentage(&self) -> f64
pub fn reduction_percentage(&self) -> f64
Get reduction percentage (negative means expression grew).
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Check if rewriting was successful (reached fixpoint without issues).
Trait Implementations§
Source§impl Clone for RewriteStats
impl Clone for RewriteStats
Source§fn clone(&self) -> RewriteStats
fn clone(&self) -> RewriteStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RewriteStats
impl Debug for RewriteStats
Source§impl Default for RewriteStats
impl Default for RewriteStats
Source§fn default() -> RewriteStats
fn default() -> RewriteStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RewriteStats
impl RefUnwindSafe for RewriteStats
impl Send for RewriteStats
impl Sync for RewriteStats
impl Unpin for RewriteStats
impl UnwindSafe for RewriteStats
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