Macro assert_cancel_safe

Source
macro_rules! assert_cancel_safe {
    ($make_future:expr, $expected:expr) => { ... };
}
Expand description

Convenience macro for assert_cancel_safe.

Example:

assert_cancel_safe!(CountToThree { step: 0 }, 42);
  • my_future_expr is any expression that produces a fresh future when evaluated (e.g. CountToThree { step: 0 }).
  • expected_value is the value you expect the future to resolve to. Pass a plain value, not a reference. The macro will take a reference internally.