[−][src]Struct holly::actor::Addr
The address of an actor.
Allows sending messages to the actor.
Methods
impl<T, A: Into<T>> Addr<T, A>
[src]
pub fn id(&self) -> Id
[src]
Get address/actor ID.
pub fn send(self, msg: A) -> impl Future<Item = Self, Error = Error>
[src]
Asynchronously send a message to the actor of this address.
Will fail if the recipient no longer exists. If the actor's mailbox is full, the future will wait until there is room.
pub fn send_now(&mut self, msg: A) -> Result<(), Error>
[src]
Immediately send a message to the actor of this address.
Used outside of futures. Fails if the actor's mailbox is full or the recipient no longer exists.
pub fn cast<B: Into<T>>(&self) -> Addr<T, B>
[src]
Create an Addr<T, B>
from this Addr<T, A>
.
This enables the creation of addresses which only accept a strict subset of messages the original address accepts.
Trait Implementations
Auto Trait Implementations
impl<T, A> Send for Addr<T, A> where
A: Send,
T: Send,
A: Send,
T: Send,
impl<T, A> Sync for Addr<T, A> where
A: Sync,
T: Send,
A: Sync,
T: Send,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,