pub fn to_raw(&self) -> MessageRaw {
        use chain_core::packer::*;
        use chain_core::property::Serialize;
        let v = Vec::new();
        let mut codec = Codec::new(v);
        codec.put_u8(self.get_tag() as u8).unwrap();
        match self {
            Message::Initial(i) => i.serialize(&mut codec).unwrap(),
            Message::OldUtxoDeclaration(s) => s.serialize(&mut codec).unwrap(),
            Message::Transaction(signed) => signed.serialize(&mut codec).unwrap(),
            Message::Certificate(signed) => signed.serialize(&mut codec).unwrap(),
            Message::UpdateProposal(proposal) => proposal.serialize(&mut codec).unwrap(),
            Message::UpdateVote(vote) => vote.serialize(&mut codec).unwrap(),
        }
        MessageRaw(codec.into_inner())
    }
/// Get the serialized representation of this message
Get the serialized representation of this message
Get the serialized representation of this message
pub fn to_raw(&self) -> MessageRaw {
        use chain_core::packer::*;
        use chain_core::property::Serialize;
        let v = Vec::new();
        let mut codec = Codec::new(v);
        codec.put_u8(self.get_tag() as u8).unwrap();
        match self {
            Message::Initial(i) => i.serialize(&mut codec).unwrap(),
            Message::OldUtxoDeclaration(s) => s.serialize(&mut codec).unwrap(),
            Message::Transaction(signed) => signed.serialize(&mut codec).unwrap(),
            Message::Certificate(signed) => signed.serialize(&mut codec).unwrap(),
            Message::UpdateProposal(proposal) => proposal.serialize(&mut codec).unwrap(),
            Message::UpdateVote(vote) => vote.serialize(&mut codec).unwrap(),
        }
        MessageRaw(codec.into_inner())
    }
pub fn to_raw ( & self ) -> MessageRaw { use chain_core :: packer :: * ; use chain_core :: property :: Serialize ; let v = Vec :: new ( ) ; let mut codec = Codec :: new ( v ) ; codec . put_u8 ( self . get_tag ( ) as u8 ) . unwrap ( ) ; match self { Message :: Initial ( i ) => i . serialize ( & mut codec ) . unwrap ( ) , Message :: OldUtxoDeclaration ( s ) => s . serialize ( & mut codec ) . unwrap ( ) , Message :: Transaction ( signed ) => signed . serialize ( & mut codec ) . unwrap ( ) , Message :: Certificate ( signed ) => signed . serialize ( & mut codec ) . unwrap ( ) , Message :: UpdateProposal ( proposal ) => proposal . serialize ( & mut codec ) . unwrap ( ) , Message :: UpdateVote ( vote ) => vote . serialize ( & mut codec ) . unwrap ( ) , } MessageRaw ( codec . into_inner ( ) ) }
Get the serialized representation of this message
Get the serialized representation of this message
&self
&self