pub struct Addr<M> { /* private fields */ }Methods from Deref<Target = Recipient<M>>§
Sourcepub fn send(&self, message: M) -> Result<(), SendError>
pub fn send(&self, message: M) -> Result<(), SendError>
Send a message to an actor. Returns SendError if the channel is full; does not block.
See SendResultExt trait for convenient handling of errors.
Sourcepub fn recipient<N: Into<M>>(&self) -> Recipient<N>
pub fn recipient<N: Into<M>>(&self) -> Recipient<N>
Convert a Recipient<M> (or Addr<M> through Deref) into Recipient<N>, where
message N can be converted into M.
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for Addr<M>
impl<M> !RefUnwindSafe for Addr<M>
impl<M> Send for Addr<M>where
M: Send,
impl<M> Sync for Addr<M>where
M: Send,
impl<M> Unpin for Addr<M>
impl<M> !UnwindSafe for Addr<M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more