Trait ActorRef

Source
pub trait ActorRef<MsgT>:
    DynClone
    + Send
    + Debug
where MsgT: ActorMsg + 'static,
{ // Required methods fn send(&mut self, message: MsgT, delay: Option<Duration>); fn set_handler(&mut self, handler: DynMsgHandler<MsgT>); fn spawn_async_send(&mut self, f: DynFuture<MsgT>, delay: Option<Duration>); fn spawn_thread_blocking_send( &mut self, f: DynLazy<MsgT>, delay: Option<Duration>, ); }

Required Methods§

Source

fn send(&mut self, message: MsgT, delay: Option<Duration>)

Source

fn set_handler(&mut self, handler: DynMsgHandler<MsgT>)

Source

fn spawn_async_send(&mut self, f: DynFuture<MsgT>, delay: Option<Duration>)

Source

fn spawn_thread_blocking_send( &mut self, f: DynLazy<MsgT>, delay: Option<Duration>, )

Trait Implementations§

Source§

impl<MsgT> ActorRef<MsgT> for dyn ActorRef<MsgT>
where MsgT: ActorMsg + 'static,

Source§

fn send(&mut self, message: MsgT, delay: Option<Duration>)

Source§

fn set_handler(&mut self, handler: DynMsgHandler<MsgT>)

Source§

fn spawn_async_send( &mut self, f: impl Future<Output = MsgT> + Send + 'static, delay: Option<Duration>, )

Source§

fn spawn_thread_blocking_send( &mut self, f: impl FnOnce() -> MsgT + Send + 'static, delay: Option<Duration>, )

Implementors§

Source§

impl<ActorRefT, MsgT> ActorRef<MsgT> for ActorRefT
where ActorRefT: ActorRef<MsgT> + ?Sized, MsgT: ActorMsg + 'static,