pub fn send<T: Message<Result = ()>>(&mut self, msg: T) -> Result<()>
    where
        A: Handler<T>,
    {
        self.tx
            .start_send(ActorEvent::Exec(Box::new(move |actor, ctx| {
                Box::pin(async move {
                    let mut actor = actor.lock().await;
                    Handler::handle(&mut *actor, &ctx, msg).await;
                })
            })))?;
        Ok(())
    }
/// Send a message `msg` to the actor without waiting for the return value.
Send a message `msg` to the actor without waiting for the return value.
Send a message ` msg ` to the actor without waiting for the return value .
pub fn send<T: Message<Result = ()>>(&mut self, msg: T) -> Result<()>
    where
        A: Handler<T>,
    {
        self.tx
            .start_send(ActorEvent::Exec(Box::new(move |actor, ctx| {
                Box::pin(async move {
                    let mut actor = actor.lock().await;
                    Handler::handle(&mut *actor, &ctx, msg).await;
                })
            })))?;
        Ok(())
    }
pub fn send < T : Message < Result = ( ) > > ( & mut self , msg : T ) -> Result < ( ) > where A : Handler < T > , { self . tx . start_send ( ActorEvent :: Exec ( Box :: new ( move | actor , ctx | { Box :: pin ( async move { let mut actor = actor . lock ( ) . await ; Handler :: handle ( & mut * actor , & ctx , msg ) . await ; } ) } ) ) ) ? ; Ok ( ( ) ) }
Send a message `msg` to the actor without waiting for the return value.
Send a message ` msg ` to the actor without waiting for the return value .
&mut self
msg
T
&mut self
msg
T