impl<A> ActorRef<A>
where
A: Actor,
{
#[inline]
#[track_caller]
#[doc(alias = "send")]
pub fn ask<M>(
&self,
msg: M,
) -> AskRequest<'_, A, M, WithoutRequestTimeout, WithoutRequestTimeout>
where
A: Message<M>,
M: Send + 'static,
{
AskRequest::new(
self,
msg,
#[cfg(all(debug_assertions, feature = "tracing"))]
std::panic::Location::caller(),
)
}
#[inline]
#[track_caller]
#[doc(alias = "send_async")]
pub fn tell<M>(&self, msg: M) -> TellRequest<'_, A, M, WithoutRequestTimeout>
where
A: Message<M>,
M: Send + 'static,
{
TellRequest::new(
self,
msg,
#[cfg(all(debug_assertions, feature = "tracing"))]
std::panic::Location::caller(),
)
}
}