[][src]Struct sealrs::actors::timers::RealTimers

pub struct RealTimers { /* fields omitted */ }

Methods

impl RealTimers[src]

pub fn new(system: TSafe<dyn AbstractActorSystem + Send>) -> Timers[src]

Trait Implementations

impl AbstractTimers for RealTimers[src]

fn start_single(
    &mut self,
    key: u32,
    self_: &ActorRef,
    to: &ActorRef,
    delay: Duration,
    msg: Message
)
[src]

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]

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

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]