Trait riker::system::Timer

source ·
pub trait Timer {
    type Msg: Message;

    fn schedule<T>(
        &self,
        initial_delay: Duration,
        interval: Duration,
        receiver: ActorRef<Self::Msg>,
        sender: Option<ActorRef<Self::Msg>>,
        msg: T
    ) -> Uuid
    where
        T: Into<ActorMsg<Self::Msg>>
; fn schedule_once<T>(
        &self,
        delay: Duration,
        receiver: ActorRef<Self::Msg>,
        sender: Option<ActorRef<Self::Msg>>,
        msg: T
    ) -> Uuid
    where
        T: Into<ActorMsg<Self::Msg>>
; fn schedule_at_time<T>(
        &self,
        time: DateTime<Utc>,
        receiver: ActorRef<Self::Msg>,
        sender: Option<ActorRef<Self::Msg>>,
        msg: T
    ) -> Uuid
    where
        T: Into<ActorMsg<Self::Msg>>
; fn cancel_schedule(&self, id: Uuid); }

Required Associated Types§

Required Methods§

Implementors§