[][src]Struct xactor::Addr

pub struct Addr<A>(_);

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>.

Methods

impl<A: Actor> Addr<A>[src]

pub async fn call<'_, T: Message>(&'_ mut self, msg: T) -> Result<T::Result> where
    A: Handler<T>, 
[src]

Send a message to the actor and wait for the return value.

pub fn send<T: Message<Result = ()>>(&mut self, msg: T) -> Result<()> where
    A: Handler<T>, 
[src]

Send a message to the actor without waiting for the return value.

pub fn caller<T: Message>(&self) -> Caller<T> where
    A: Handler<T>, 
[src]

Create a Caller<T> for a specific message type

pub fn sender<T: Message<Result = ()>>(&self) -> Sender<T> where
    A: Handler<T>, 
[src]

Create a Sender<T> for a specific message type

Trait Implementations

impl<A> Clone for Addr<A>[src]

Auto Trait Implementations

impl<A> !RefUnwindSafe for Addr<A>

impl<A> Send for Addr<A>

impl<A> Sync for Addr<A>

impl<A> Unpin for Addr<A>

impl<A> !UnwindSafe for Addr<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.