ractor

Macro forward

source
macro_rules! forward {
    ($actor:expr, $msg:expr, $forward:ident, $forward_mapping:expr) => { ... };
    ($actor:expr, $msg:expr, $forward:ident, $forward_mapping:expr, $timeout:expr) => { ... };
}
Expand description

forward!: Perform a remote procedure call to a crate::Actor and forwards the result to another actor if successful

  • $actor - The actors to call
  • $msg - The message builder, which takes in a crate::port::RpcReplyPort and emits a message which the actor supports.
  • $forward - The crate::ActorRef to forward the call to
  • $forward_mapping - The message transformer from the RPC result to the forwarding actor’s message format
  • $timeout - The crate::concurrency::Duration to allow the call to complete before timing out.

Returns [Ok(())] on successful call forwarding, [Err(crate::RactorErr)] otherwies