logo
pub trait MessageExt: Message {
    fn to_bytes(&self) -> Result<Vec<u8>, EncodeError>;

    fn from_any(any: &Any) -> Result<Self, DecodeError>
    where
        Self: Default + Sized + TypeUrl
, { ... } fn to_any(&self) -> Result<Any, EncodeError>
    where
        Self: TypeUrl
, { ... } }
Expand description

Extension trait for Message.

Required Methods

Serialize this protobuf message as a byte vector.

Provided Methods

Parse this message proto from Any.

Serialize this message proto as Any.

Implementors