Struct halt::Remote

source · []
pub struct Remote { /* private fields */ }
Expand description

A remote that allows for pausing, stopping, and resuming the Halt wrapper from another thread.

Examples

let halt = halt::new(0..10);
let remote = halt.remote();

Implementations

Resumes the Halt, causing it to run as normal.

Returns true if the remote is_valid.

Pauses the Halt, causing the thread that runs it to sleep until resumed or stopped.

Returns true if the remote is_valid.

Stops the Halt, causing it to behave as done until resumed or paused.

When Halt is used as an iterator, the iterator will return None. When used as a reader or writer, it will return Ok(0).

Returns true if the remote is_valid.

Returns true if the remote is valid, i.e. the Halt has not been dropped.

Returns true if running.

Returns true if paused.

Returns true if stopped.

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

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 resulting type after obtaining ownership.

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

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.