[][src]Macro sealrs::in_state

macro_rules! in_state {
    ($r:ident , $t:path, $a:ident => $e:expr) => { ... };
}

Extract actor object from TestActorRef. This object is immutable and may be used for reversion of the internal actor's state. For use this macros, target actor must implement the as_any method from the Actor trait. Without satisfying this condition, macros will cause panic.

Examples

in_state! (target, Foo, actor => {
    assert_eq!(actor.data, 599);
});

// target - TestActorRef
// Foo - actor type under actor reference