Macro stakker::fwd_do

source ·
macro_rules! fwd_do {
    ($cb:expr) => { ... };
}
Expand description

Create a Fwd instance which performs an arbitrary action

The action is performed immediately at the point in the code where the message is forwarded. So this is executed synchronously rather than asynchronously. However it will normally be used to defer a call, since it doesn’t have access to any actor, just the message data. If it doesn’t have an actor reference available, it will probably need to capture a Deferrer in the closure.

fwd_do!(|msg| ...);

Implemented using Fwd::new.