Struct tonari_actor::Addr[][src]

pub struct Addr<A: Actor + ?Sized> { /* fields omitted */ }

Implementations

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

pub fn with_capacity(capacity: usize) -> Self[src]

pub fn recipient<M: Into<A::Message>>(&self) -> Recipient<M>[src]

“Genericize” an address to, rather than point to a specific actor, be applicable to any actor that handles a given message-response type. Allows you to create recipient not only of A::Message, but of any M: Into<A::Message>.

Methods from Deref<Target = Recipient<M>>

pub fn send(&self, message: M) -> Result<(), SendError>[src]

Non-blocking call to send a message. Use this if you need to react when the channel is full. See SendResultExt trait for convenient handling of errors.

pub fn remaining_capacity(&self) -> Option<usize>[src]

The remaining capacity for the message channel.

Trait Implementations

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

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

impl<A, M> Deref for Addr<A> where
    A: Actor<Message = M>, 
[src]

type Target = Recipient<M>

The resulting type after dereferencing.

Auto Trait Implementations

impl<A> !RefUnwindSafe for Addr<A>

impl<A: ?Sized> Send for Addr<A>

impl<A: ?Sized> Sync for Addr<A>

impl<A: ?Sized> Unpin for Addr<A> where
    <A as Actor>::Message: Unpin

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.