Struct calloop::timer::Timer [−][src]
pub struct Timer<T> { /* fields omitted */ }
Expand description
A Timer event source
It generates events of type (T, TimerHandle<T>)
, providing you
an handle inside the event callback, allowing you to set new timeouts
as a response to a timeout being reached (for reccuring ticks for example).
Implementations
Trait Implementations
type Event = T
type Event = T
The type of events generated by your source.
type Metadata = TimerHandle<T>
type Metadata = TimerHandle<T>
Some metadata of your event source Read more
fn process_events<C>(
&mut self,
readiness: Readiness,
token: Token,
callback: C
) -> Result<PostAction> where
C: FnMut(Self::Event, &mut Self::Metadata) -> Self::Ret,
fn process_events<C>(
&mut self,
readiness: Readiness,
token: Token,
callback: C
) -> Result<PostAction> where
C: FnMut(Self::Event, &mut Self::Metadata) -> Self::Ret,
Process any relevant events Read more
Register yourself to this poll instance Read more
Re-register your file descriptors Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Timer<T>
impl<T> UnwindSafe for Timer<T>