Trait ibc_client_cw::utils::AnyCodec

source ·
pub trait AnyCodec {
    // Provided methods
    fn decode_any_vec<C>(data: Vec<u8>) -> Result<C, ClientError>
       where C: TryFrom<Any, Error = ClientError> { ... }
    fn encode_to_any_vec<C>(value: C) -> Vec<u8> 
       where C: Into<Any> { ... }
}
Expand description

AnyCodec is a convenient trait that provides a generic way to encode and decode domain types through the Any type.

Provided Methods§

source

fn decode_any_vec<C>(data: Vec<u8>) -> Result<C, ClientError>
where C: TryFrom<Any, Error = ClientError>,

source

fn encode_to_any_vec<C>(value: C) -> Vec<u8>
where C: Into<Any>,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> AnyCodec for T
where T: TryFrom<Any, Error = ClientError> + Into<Any>,