[][src]Struct halt::Remote

pub struct Remote { /* fields omitted */ }

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

Examples

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

Methods

impl Remote[src]

pub fn pause(&self) -> Result[src]

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

pub fn resume(&self) -> Result[src]

Resumes the iterator, causing the Halt wrapper to run as normal.

pub fn stop(&self) -> Result[src]

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

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

Trait Implementations

impl Clone for Remote[src]

impl Debug for Remote[src]

Auto Trait Implementations

impl Send for Remote

impl Sync for Remote

impl Unpin for Remote

impl !UnwindSafe for Remote

impl !RefUnwindSafe for Remote

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]