fn matches_transition_msg()

in netbench-orchestrator/src/russula/workflow.rs [184:199]


    fn matches_transition_msg(&self, recv_msg: &Msg) -> RussulaResult<bool> {
        let state = self.state();
        if let TransitionStep::AwaitNext(expected_msg) = state.transition_step() {
            let should_transition_to_next = expected_msg == recv_msg.as_bytes();
            debug!(
                "{} expect: {} actual: {}",
                self.name(),
                std::str::from_utf8(&expected_msg)
                    .expect("AwaitNext should contain valid string slices"),
                recv_msg.as_str()
            );
            Ok(should_transition_to_next)
        } else {
            Ok(false)
        }
    }