pub struct Options {
    pub checkpoint_size: u64,
    pub max_checkpoint_size: Option<u64>,
}
Expand description

Optional parameters for creating a new progress observer.

Fields§

§checkpoint_size: u64

The checkpoint size represents the number of ticks until the next progress update is emitted.

It is adjusted automatically each printout based on the duration of the work performed, and thus it is typically not necessary to set manually; the default starting checkpoint size of 1 is sufficient for almost any workload, and the checkpoint size will adjust automatically within 1-3 prints to adapt to the workload you’re performing. Specify only if you both have a strong estimate for how many iterations will pass within the timeframe of your specified frequency target, and you actually care about the frequency of those first couple printouts.

§max_checkpoint_size: Option<u64>

In some instances, such as during particularly chaotic computations, the observer could erroneously derive an exceedingly large size for the next potential checkpoint. In those situations, you might want to specify a maximum number of ticks between progress reports, so that the observer doesn’t get stuck waiting indefinitely after a bad next checkpoint estimate.

Trait Implementations§

source§

impl Default for Options

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.