[−][src]Struct xactor::Addr
The address of an actor.
When all references to Addr<A>
are dropped, the actor ends.
You can use Clone
trait to create multiple copies of Addr<A>
.
Implementations
impl<A> Addr<A>
[src]
impl<A: Actor> Addr<A>
[src]
pub fn actor_id(&self) -> ActorId
[src]
Returns the id of the actor.
pub fn stop(&mut self, err: Option<Error>) -> Result<()>
[src]
Stop the actor.
pub async fn call<T: Message>(&self, msg: T) -> Result<T::Result> where
A: Handler<T>,
[src]
A: Handler<T>,
Send a message msg
to the actor and wait for the return value.
pub fn send<T: Message<Result = ()>>(&self, msg: T) -> Result<()> where
A: Handler<T>,
[src]
A: Handler<T>,
Send a message msg
to the actor without waiting for the return value.
pub fn caller<T: Message>(&self) -> Caller<T> where
A: Handler<T>,
[src]
A: Handler<T>,
Create a Caller<T>
for a specific message type
pub fn sender<T: Message<Result = ()>>(&self) -> Sender<T> where
A: Handler<T>,
[src]
A: Handler<T>,
Create a Sender<T>
for a specific message type
pub async fn wait_for_stop(self)
[src]
Wait for an actor to finish, and if the actor has finished, the function returns immediately.
impl<T: Message<Result = ()> + Clone> Addr<Broker<T>>
[src]
Trait Implementations
impl<A> Clone for Addr<A>
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A> Hash for Addr<A>
[src]
pub fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<A> PartialEq<Addr<A>> for Addr<A>
[src]
Auto Trait Implementations
impl<A> !RefUnwindSafe for Addr<A>
[src]
impl<A> Send for Addr<A>
[src]
impl<A> Sync for Addr<A>
[src]
impl<A> Unpin for Addr<A>
[src]
impl<A> !UnwindSafe for Addr<A>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,