Struct tiny_tokio_actor::ActorRef
source · pub struct ActorRef<E: SystemEvent, A: Actor<E>> { /* private fields */ }Expand description
A clonable actor reference. It basically holds a Sender that can send messages to the mailbox (receiver) of the actor.
Implementations§
source§impl<E: SystemEvent, A: Actor<E>> ActorRef<E, A>
impl<E: SystemEvent, A: Actor<E>> ActorRef<E, A>
sourcepub fn tell<M>(&self, msg: M) -> Result<(), ActorError>where
M: Message,
A: Handler<E, M>,
pub fn tell<M>(&self, msg: M) -> Result<(), ActorError>where M: Message, A: Handler<E, M>,
Fire and forget sending of messages to this actor.
Trait Implementations§
Auto Trait Implementations§
impl<E, A> !RefUnwindSafe for ActorRef<E, A>
impl<E, A> Send for ActorRef<E, A>
impl<E, A> Sync for ActorRef<E, A>
impl<E, A> Unpin for ActorRef<E, A>
impl<E, A> !UnwindSafe for ActorRef<E, A>
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