Iteration

Struct Iteration 

Source
#[non_exhaustive]
pub struct Iteration<IterData> { pub egraph_nodes: usize, pub egraph_classes: usize, pub applied: IndexMap<Symbol, usize, FxBuildHasher>, pub hook_time: f64, pub search_time: f64, pub apply_time: f64, pub rebuild_time: f64, pub total_time: f64, pub data: IterData, pub n_rebuilds: usize, pub stop_reason: Option<StopReason>, }
Expand description

Data generated by running a Runner one iteration.

If the serde-1 feature is enabled, this implements serde::Serialize, which is useful if you want to output this as a JSON or some other format.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§egraph_nodes: usize

The number of enodes in the egraph at the start of this iteration.

§egraph_classes: usize

The number of eclasses in the egraph at the start of this iteration.

§applied: IndexMap<Symbol, usize, FxBuildHasher>

A map from rule name to number of times it was newly applied in this iteration.

§hook_time: f64

Seconds spent running hooks.

§search_time: f64

Seconds spent searching in this iteration.

§apply_time: f64

Seconds spent applying rules in this iteration.

§rebuild_time: f64

Seconds spent rebuilding the egraph in this iteration.

§total_time: f64

Total time spent in this iteration, including data generation time.

§data: IterData

The user provided annotation for this iteration

§n_rebuilds: usize

The number of rebuild iterations done after this iteration completed.

§stop_reason: Option<StopReason>

If the runner stopped on this iterations, this is the reason

Trait Implementations§

Source§

impl<IterData: Clone> Clone for Iteration<IterData>

Source§

fn clone(&self) -> Iteration<IterData>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<IterData: Debug> Debug for Iteration<IterData>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<IterData> Serialize for Iteration<IterData>
where IterData: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<IterData> Freeze for Iteration<IterData>
where IterData: Freeze,

§

impl<IterData> RefUnwindSafe for Iteration<IterData>
where IterData: RefUnwindSafe,

§

impl<IterData> Send for Iteration<IterData>
where IterData: Send,

§

impl<IterData> Sync for Iteration<IterData>
where IterData: Sync,

§

impl<IterData> Unpin for Iteration<IterData>
where IterData: Unpin,

§

impl<IterData> UnwindSafe for Iteration<IterData>
where IterData: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.