[][src]Struct libuv::handles::idle::IdleHandle

pub struct IdleHandle { /* fields omitted */ }

Idle handles will run the given callback once per loop iteration, right before the uv_prepare_t handles.

Note: The notable difference with prepare handles is that when there are active idle handles, the loop will perform a zero timeout poll instead of blocking for i/o.

Warning: Despite the name, idle handles will get their callbacks called on every loop iteration, not when the loop is actually “idle”.

Implementations

impl IdleHandle[src]

pub fn new(r#loop: &Loop) -> Result<IdleHandle>[src]

Create and initialize a new idle handle

pub fn start<CB: Into<IdleCB<'static>>>(&mut self, cb: CB) -> Result<()>[src]

Start the handle with the given callback. This function always succeeds, except when cb is ().

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

Stop the handle, the callback will no longer be called. This function always succeeds.

Trait Implementations

impl Clone for IdleHandle[src]

impl Copy for IdleHandle[src]

impl From<IdleHandle> for Handle[src]

impl HandleTrait for IdleHandle[src]

impl ToHandle for IdleHandle[src]

impl TryFrom<Handle> for IdleHandle[src]

type Error = ConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.