fn compare(&self, flow_id: FlowId, payload: TransportPayload, rcv_msg: TestMessage) -> bool {
        if rcv_msg.flow_id != flow_id {
            warn!(self.log, "compare(): FlowTag mismatch");
            return false;
        }

        if payload.0.len() != rcv_msg.payload.0.len() {
            warn!(self.log, "compare(): Length mismatch");
            return false;
        }

        for i in 0..payload.0.len() {
            if payload.0[i] != rcv_msg.payload.0[i] {
                warn!(self.log, "Payload mismatch");
                return false;
            }
        }

        true
    }
// Compares the two messages(hdr and payload parts)
Compares the two messages(hdr and payload parts)
Compares the two messages ( hdr and payload parts )
fn compare(&self, flow_id: FlowId, payload: TransportPayload, rcv_msg: TestMessage) -> bool {
        if rcv_msg.flow_id != flow_id {
            warn!(self.log, "compare(): FlowTag mismatch");
            return false;
        }
        if payload.0.len() != rcv_msg.payload.0.len() {
            warn!(self.log, "compare(): Length mismatch");
            return false;
        }
        for i in 0..payload.0.len() {
            if payload.0[i] != rcv_msg.payload.0[i] {
                warn!(self.log, "Payload mismatch");
                return false;
            }
        }
        true
    }
fn compare ( & self , flow_id : FlowId , payload : TransportPayload , rcv_msg : TestMessage ) -> bool { if rcv_msg . flow_id != flow_id { warn ! ( self log " " ) ; return false ; } if payload . 0 . len ( ) != rcv_msg . payload . 0 . len ( ) { warn ! ( self log " " ) ; return false ; } for i in 0 .. payload . 0 . len ( ) { if payload . 0 [ i ] != rcv_msg . payload . 0 [ i ] { warn ! ( self log " " ) ; return false ; } } true }
Compares the two messages(hdr and payload parts)
Compares the two messages ( hdr and payload parts )
&self
flow_id
FlowId
payload
TransportPayload
rcv_msg
TestMessage
&self
flow_id
FlowId
payload
TransportPayload
rcv_msg
TestMessage