[−][src]Struct libuv::handles::idle::IdleHandle
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]
fn clone(&self) -> IdleHandle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for IdleHandle
[src]
impl From<IdleHandle> for Handle
[src]
fn from(idle: IdleHandle) -> Handle
[src]
impl HandleTrait for IdleHandle
[src]
fn is_active(&self) -> bool
[src]
fn is_closing(&self) -> bool
[src]
fn close<CB: Into<CloseCB<'static>>>(&mut self, cb: CB)
[src]
fn ref(&mut self)
[src]
fn unref(&mut self)
[src]
fn has_ref(&self) -> bool
[src]
fn send_buffer_size(&mut self, value: i32) -> Result<i32>
[src]
fn recv_buffer_size(&mut self, value: i32) -> Result<i32>
[src]
fn get_fileno(&self) -> Result<OsFile>
[src]
fn get_loop(&self) -> Loop
[src]
fn get_type(&self) -> HandleType
[src]
impl ToHandle for IdleHandle
[src]
impl TryFrom<Handle> for IdleHandle
[src]
Auto Trait Implementations
impl RefUnwindSafe for IdleHandle
impl !Send for IdleHandle
impl !Sync for IdleHandle
impl Unpin for IdleHandle
impl UnwindSafe for IdleHandle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,