[][src]Struct xtra::Address

pub struct Address<A: Actor> { /* fields omitted */ }

An Address is a reference to an actor through which Messages can be sent. It can be cloned, and when all Addresses 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]

pub fn do_send_async<M>(&self, message: M) -> Result<(), Disconnected> where
    M: Message,
    A: AsyncHandler<M> + Send
[src]

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]

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]

Trait Implementations

impl<A: Clone + Actor> Clone for Address<A>[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.