pub struct ActorMessage<A, M>where
A: Handler<M> + Send + Sync + Actor,
M: Send + Sync + Message,
M::Result: 'static + Send + Sync,{ /* private fields */ }Implementations§
Source§impl<A, M> ActorMessage<A, M>
impl<A, M> ActorMessage<A, M>
pub fn new(msg: M, sender: Option<Sender<M::Result>>) -> ActorMessage<A, M>
pub async fn handle_msg(&mut self, actor: &mut A, ctx: &mut ActorHandlerContext)
Trait Implementations§
Source§impl<A, M> ActorMessageHandler<A> for ActorMessage<A, M>
impl<A, M> ActorMessageHandler<A> for ActorMessage<A, M>
fn handle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
actor: &'life1 mut A,
ctx: &'life2 mut ActorHandlerContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl<A, M> Freeze for ActorMessage<A, M>where
M: Freeze,
impl<A, M> !RefUnwindSafe for ActorMessage<A, M>
impl<A, M> Send for ActorMessage<A, M>
impl<A, M> Sync for ActorMessage<A, M>
impl<A, M> Unpin for ActorMessage<A, M>
impl<A, M> UnsafeUnpin for ActorMessage<A, M>where
M: UnsafeUnpin,
impl<A, M> !UnwindSafe for ActorMessage<A, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more