Struct oxi_libuv::TimerHandle
source · pub struct TimerHandle { /* private fields */ }
Expand description
Binding to libuv’s Timer handle used to schedule callbacks to be called in the future.
Implementations§
source§impl TimerHandle
impl TimerHandle
sourcepub fn start<Cb, E>(
timeout: Duration,
repeat: Duration,
callback: Cb
) -> Result<Self, Error>where
Cb: FnMut(&mut Self) -> Result<(), E> + 'static,
E: StdError + 'static,
pub fn start<Cb, E>( timeout: Duration, repeat: Duration, callback: Cb ) -> Result<Self, Error>where Cb: FnMut(&mut Self) -> Result<(), E> + 'static, E: StdError + 'static,
Executes a callback every repeat
interval starting after timeout
.
If the timeout is zero the callback will fire on the next event loop iteration.
Auto Trait Implementations§
impl !RefUnwindSafe for TimerHandle
impl !Send for TimerHandle
impl !Sync for TimerHandle
impl Unpin for TimerHandle
impl !UnwindSafe for TimerHandle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more