pub struct State<A> where
    A: Algorithm
{ pub started_at: DateTime<Local>, pub iteration: u64, pub duration: Duration, pub processing_time: ProcessingTime, pub result: <A as Algorithm>::Output, }
Expand description

The State struct holds the state of the Simulation.

Fields

started_at: DateTime<Local>

The local time when this simulation started.

iteration: u64

The number of the iteration that this state represents. Iterations are counted from 1 and increased by 1 on each iteration of the simulation loop.

duration: Duration

Duration of processing the current iteration. This is the time it took to process one iteration of the algorithm.

processing_time: ProcessingTime

Accumulated time spent by each thread in case of parallel processing. In case of sequential processing this time is nearly the same as the duration value. In case of parallel processing this time is usually a multitude of the duration.

result: <A as Algorithm>::Output

The result of this iteration.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.