pub struct ActorRef<A: Actor> { /* private fields */ }
Expand description
Implementations§
source§impl<A: Actor> ActorRef<A>
impl<A: Actor> ActorRef<A>
pub async fn send<Msg: Message>( &self, msg: Msg ) -> Result<Msg::Result, ActorRefErr>where A: Handler<Msg>,
pub async fn notify<Msg: Message>(&self, msg: Msg) -> Result<(), ActorRefErr>where A: Handler<Msg>,
pub fn is_local(&self) -> bool
pub fn is_remote(&self) -> bool
pub fn unwrap_remote(self) -> RemoteActorRef<A>
pub fn unwrap_local(self) -> LocalActorRef<A>
Trait Implementations§
source§impl<A: Actor> From<LocalActorRef<A>> for ActorRef<A>
impl<A: Actor> From<LocalActorRef<A>> for ActorRef<A>
source§fn from(r: LocalActorRef<A>) -> Self
fn from(r: LocalActorRef<A>) -> Self
Converts to this type from the input type.
source§impl<A: Actor> From<RemoteActorRef<A>> for ActorRef<A>
impl<A: Actor> From<RemoteActorRef<A>> for ActorRef<A>
source§fn from(r: RemoteActorRef<A>) -> Self
fn from(r: RemoteActorRef<A>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<A> !RefUnwindSafe for ActorRef<A>
impl<A> Send for ActorRef<A>
impl<A> Sync for ActorRef<A>
impl<A> Unpin for ActorRef<A>where A: Unpin,
impl<A> !UnwindSafe for ActorRef<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