fn msg_code_of_message(msg: &Message) -> MsgCode {
            match *msg {
                Message::Hello => MsgCode::Hello,
                Message::Error(_) => MsgCode::Error,
                Message::EchoRequest(_) => MsgCode::EchoReq,
                Message::EchoReply(_) => MsgCode::EchoResp,
                Message::FeaturesReq => MsgCode::FeaturesReq,
                Message::FeaturesReply(_) => MsgCode::FeaturesResp,
                Message::FlowMod(_) => MsgCode::FlowMod,
                Message::PacketIn(_) => MsgCode::PacketIn,
                Message::FlowRemoved(_) => MsgCode::FlowRemoved,
                Message::PortStatus(_) => MsgCode::PortStatus,
                Message::PacketOut(_) => MsgCode::PacketOut,
                Message::BarrierRequest => MsgCode::BarrierReq,
                Message::BarrierReply => MsgCode::BarrierResp,
            }
        }
/// Map `Message` to associated OpenFlow message type code `MsgCode`.
Map `Message` to associated OpenFlow message type code `MsgCode`.
Map ` Message ` to associated OpenFlow message type code ` MsgCode ` .
fn msg_code_of_message(msg: &Message) -> MsgCode {
            match *msg {
                Message::Hello => MsgCode::Hello,
                Message::Error(_) => MsgCode::Error,
                Message::EchoRequest(_) => MsgCode::EchoReq,
                Message::EchoReply(_) => MsgCode::EchoResp,
                Message::FeaturesReq => MsgCode::FeaturesReq,
                Message::FeaturesReply(_) => MsgCode::FeaturesResp,
                Message::FlowMod(_) => MsgCode::FlowMod,
                Message::PacketIn(_) => MsgCode::PacketIn,
                Message::FlowRemoved(_) => MsgCode::FlowRemoved,
                Message::PortStatus(_) => MsgCode::PortStatus,
                Message::PacketOut(_) => MsgCode::PacketOut,
                Message::BarrierRequest => MsgCode::BarrierReq,
                Message::BarrierReply => MsgCode::BarrierResp,
            }
        }
fn msg_code_of_message ( msg : & Message ) -> MsgCode { match * msg { Message :: Hello => MsgCode :: Hello , Message :: Error ( _ ) => MsgCode :: Error , Message :: EchoRequest ( _ ) => MsgCode :: EchoReq , Message :: EchoReply ( _ ) => MsgCode :: EchoResp , Message :: FeaturesReq => MsgCode :: FeaturesReq , Message :: FeaturesReply ( _ ) => MsgCode :: FeaturesResp , Message :: FlowMod ( _ ) => MsgCode :: FlowMod , Message :: PacketIn ( _ ) => MsgCode :: PacketIn , Message :: FlowRemoved ( _ ) => MsgCode :: FlowRemoved , Message :: PortStatus ( _ ) => MsgCode :: PortStatus , Message :: PacketOut ( _ ) => MsgCode :: PacketOut , Message :: BarrierRequest => MsgCode :: BarrierReq , Message :: BarrierReply => MsgCode :: BarrierResp , } }
Map `Message` to associated OpenFlow message type code `MsgCode`.
Map ` Message ` to associated OpenFlow message type code ` MsgCode ` .
msg
&Message
msg
&Message