[−][src]Trait sealrs::actors::timers::AbstractTimers
Required methods
fn start_single(
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
delay: Duration,
msg: Message
)
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
delay: Duration,
msg: Message
)
fn start_periodic(
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
interval: Duration,
msg: Box<dyn Fn() -> Message + Send + 'static>
)
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
interval: Duration,
msg: Box<dyn Fn() -> Message + Send + 'static>
)
fn cancel(&mut self, key: u32)
fn cancel_all(&mut self)
Implementors
impl AbstractTimers for RealTimers
[src]
fn start_single(
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
delay: Duration,
msg: Message
)
[src]
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
delay: Duration,
msg: Message
)
Starts single timer task. Accept as args - key, refs to self and receiver of message, delay and message for send. For example see module level doc or example actor in the examples module.
fn start_periodic(
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
interval: Duration,
msg: Box<dyn Fn() -> Message + Send + 'static>
)
[src]
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
interval: Duration,
msg: Box<dyn Fn() -> Message + Send + 'static>
)
Starts single timer task. Accept as args - key, refs to self and receiver of message, delay and closure which produce a message for send. For example see the module level doc or example actor in the examples module.
fn cancel(&mut self, key: u32)
[src]
Cancel timer by it's key
fn cancel_all(&mut self)
[src]
Cancels all timers
impl AbstractTimers for StubTimers
[src]
fn start_single(
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
delay: Duration,
msg: Message
)
[src]
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
delay: Duration,
msg: Message
)
fn start_periodic(
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
interval: Duration,
msg: Box<dyn Fn() -> Message + Send + 'static>
)
[src]
&mut self,
key: u32,
self_: &ActorRef,
to: &ActorRef,
interval: Duration,
msg: Box<dyn Fn() -> Message + Send + 'static>
)