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>
pub fn start<Cb, E>( timeout: Duration, repeat: Duration, callback: Cb, ) -> Result<Self, Error>
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 Freeze for TimerHandle
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