macro_rules! ret_do { ($cb:expr) => { ... }; }
Expand description
Create a Ret
instance which performs an arbitrary action
The action is performed immediately at the point in the code where
the message is returned. 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.
ⓘ
ret_do!(|msg| ...);
Implemented using Ret::new
.