pub struct PosixTimer { /* private fields */ }
Expand description
Posix Timer
When using c_wrapper
feature implementation uses C shim to create timers which call callbacks
from a separate thread.
Without it, callback is called from signal handler which limits usable operations within the callback.
Implementations§
Trait Implementations§
source§impl Drop for PosixTimer
impl Drop for PosixTimer
source§impl Future for PosixTimer
impl Future for PosixTimer
source§impl SyncTimer for PosixTimer
impl SyncTimer for PosixTimer
source§impl Timer for PosixTimer
impl Timer for PosixTimer
source§fn is_ticking(&self) -> bool
fn is_ticking(&self) -> bool
Returns whether timer is ongoing. Read more
source§fn is_expired(&self) -> bool
fn is_expired(&self) -> bool
Returns whether timer has expired.
source§fn restart_ctx(&mut self, new_value: Duration, waker: &Waker)
fn restart_ctx(&mut self, new_value: Duration, waker: &Waker)
Restarts timer with new timeout value and waker.
Auto Trait Implementations§
impl Freeze for PosixTimer
impl !RefUnwindSafe for PosixTimer
impl Send for PosixTimer
impl Sync for PosixTimer
impl Unpin for PosixTimer
impl UnwindSafe for PosixTimer
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
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more