pub async fn call<TMessage, TReply, TMsgBuilder>(
actor: &ActorCell,
msg_builder: TMsgBuilder,
timeout_option: Option<Duration>
) -> Result<CallResult<TReply>, MessagingErr<TMessage>>
Expand description
Sends an asynchronous request to the specified actor, building a one-time use reply channel and awaiting the result with the specified timeout
actor
- A reference to the ActorCell to communicate withmsg_builder
- The FnOnce to construct the messagetimeout_option
- An optional Duration which represents the amount of time until the operation times out
Returns [Ok(CallResult)] upon successful initial sending with the reply from the crate::Actor, [Err(MessagingErr)] if the initial send operation failed