Trait NibiruProstMsg

Source
pub trait NibiruProstMsg: Message {
    // Required methods
    fn to_bytes(&self) -> Vec<u8> ;
    fn to_binary(&self) -> Binary;

    // Provided methods
    fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg { ... }
    fn from_any(any: &Any) -> Result<Self, DecodeError>
       where Self: Default + Name + Sized { ... }
}

Required Methods§

Source

fn to_bytes(&self) -> Vec<u8>

Serialize this protobuf message as a byte vector

Source

fn to_binary(&self) -> Binary

Provided Methods§

Source

fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg

A type implementing prost::Message is not guaranteed to implement prost::Name and have a Name.type_url() function. This method attempts to downcast the message to prost::Name, and if successful, constructs a CosmosMsg::Stargate object corresponding to the type.

Source

fn from_any(any: &Any) -> Result<Self, DecodeError>
where Self: Default + Name + Sized,

Parse into this protobuf type from prost_types::Any.

Implementors§

Source§

impl<M> NibiruProstMsg for M
where M: Message,