macro_rules! assert_state_matches { ($harness:expr, $($field:tt).+, $pattern:pat $(if $guard:expr)?) => { ... }; }
Assert that a field of the harness state matches a pattern.
use tui_dispatch::testing::{TestHarness, assert_state_matches}; assert_state_matches!(harness, connection_status, ConnectionStatus::Connected { .. });