[][src]Macro stakker::fwd_do

macro_rules! fwd_do {
    ($cb:expr) => { ... };
}

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.

This example is not tested
fwd_do!(|msg| ...);

Implemented using Fwd::new.