Struct spin_sleep::LoopHelperBuilder[][src]

pub struct LoopHelperBuilder { /* fields omitted */ }
Expand description

Builds LoopHelper.

Implementations

Sets the interval between LoopHelper::report_rate reports in seconds.

Sets the interval between LoopHelper::report_rate reports.

Sets the native sleep accuracy. See SpinSleeper::new for details.

Defaults to a platform specific opinionated value, that can change from release to release. Set this to ensure consistent behaviour across releases. However, consider that this value should be tuned & tested for a given platform.

Builds a LoopHelper without targeting a rate. This means all calls to LoopHelper::loop_sleep will simply return immediately. Normally used when only interested in the LoopHelper rate reporting.

Builds a LoopHelper targeting an input target_rate. Note: The target_rate only affects LoopHelper::loop_sleep.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.