pub struct Addr<S> { /* private fields */ }
Implementations
sourceimpl<S> Addr<S>
impl<S> Addr<S>
pub fn recipient<M>(self) -> Recipient<M>where
S: Handler<M> + 'static,
M: Message,
sourcepub async fn send<M>(&self, message: M) -> Result<M::Result>where
M: Message + Send + 'static,
S: Handler<M>,
pub async fn send<M>(&self, message: M) -> Result<M::Result>where
M: Message + Send + 'static,
S: Handler<M>,
Sends a message to the actor and wait for the result
sourcepub async fn send_timeout<M>(
&self,
timeout: Duration,
message: M
) -> Result<M::Result>where
M: Message + Send + 'static,
S: Handler<M>,
pub async fn send_timeout<M>(
&self,
timeout: Duration,
message: M
) -> Result<M::Result>where
M: Message + Send + 'static,
S: Handler<M>,
Sends a message to the actor and wait for the result, but only for a limited time.
Trait Implementations
Auto Trait Implementations
impl<S> !RefUnwindSafe for Addr<S>
impl<S> Send for Addr<S>where
S: Send,
impl<S> Sync for Addr<S>where
S: Send,
impl<S> Unpin for Addr<S>
impl<S> !UnwindSafe for Addr<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more