Trait cosm_utils::chain::msg::Msg

source ·
pub trait Msg: Clone + Sized + TryFrom<Self::Proto, Error = Self::Err> + TryInto<Self::Proto, Error = Self::Err> {
    type Proto: Default + MessageExt + Sized + TypeUrl;
    type Err: From<ChainError> + Debug + Display;

    // Provided methods
    fn from_any(any: &Any) -> Result<Self, Self::Err> { ... }
    fn to_any(&self) -> Result<Any, Self::Err> { ... }
    fn into_any(self) -> Result<Any, Self::Err> { ... }
}

Required Associated Types§

source

type Proto: Default + MessageExt + Sized + TypeUrl

Protobuf type

source

type Err: From<ChainError> + Debug + Display

Protobuf conversion error type

Provided Methods§

source

fn from_any(any: &Any) -> Result<Self, Self::Err>

Parse this message proto from Any.

source

fn to_any(&self) -> Result<Any, Self::Err>

Serialize this message proto as Any.

source

fn into_any(self) -> Result<Any, Self::Err>

Convert this message proto into Any.

Implementors§

source§

impl Msg for ExecRequestProto

§

type Proto = MsgExecuteContract

§

type Err = CosmwasmError

source§

impl Msg for InstantiateRequestProto

§

type Proto = MsgInstantiateContract

§

type Err = CosmwasmError

source§

impl Msg for MigrateRequestProto

§

type Proto = MsgMigrateContract

§

type Err = CosmwasmError

source§

impl Msg for StoreCodeProto

§

type Proto = MsgStoreCode

§

type Err = CosmwasmError

source§

impl Msg for SendRequestProto

§

type Proto = MsgSend

§

type Err = BankError