[−][src]Struct xtra::Address
An Address
is a reference to an actor through which Message
s can be
sent. It can be cloned, and when all Address
es are dropped, the actor will be stopped. It is
created by calling the Actor::start
or
Actor::spawn
methods.
Methods
impl<A: Actor> Address<A>
[src]
pub fn do_send<M>(&self, message: M) -> Result<(), Disconnected> where
M: Message,
A: Handler<M> + Send,
[src]
M: Message,
A: Handler<M> + Send,
pub fn do_send_async<M>(&self, message: M) -> Result<(), Disconnected> where
M: Message,
A: AsyncHandler<M> + Send,
[src]
M: Message,
A: AsyncHandler<M> + Send,
pub fn send<M>(
&self,
message: M
) -> impl Future<Output = Result<M::Result, Disconnected>> where
M: Message,
A: Handler<M> + Send,
M::Result: Send,
[src]
&self,
message: M
) -> impl Future<Output = Result<M::Result, Disconnected>> where
M: Message,
A: Handler<M> + Send,
M::Result: Send,
pub fn send_async<M>(
&self,
message: M
) -> impl Future<Output = Result<M::Result, Disconnected>> where
M: Message,
A: AsyncHandler<M> + Send,
A::Responder: Future<Output = M::Result> + Send,
[src]
&self,
message: M
) -> impl Future<Output = Result<M::Result, Disconnected>> where
M: Message,
A: AsyncHandler<M> + Send,
A::Responder: Future<Output = M::Result> + Send,
Trait Implementations
Auto Trait Implementations
impl<A> !RefUnwindSafe for Address<A>
impl<A> Send for Address<A>
impl<A> Sync for Address<A>
impl<A> Unpin for Address<A>
impl<A> !UnwindSafe for Address<A>
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,