Struct ibc::primitives::proto::Any

source ·
pub struct Any {
    pub type_url: String,
    pub value: Vec<u8>,
}
Expand description

Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.

Example 1: Pack and unpack a message in C++.

 Foo foo = ...;
 Any any;
 any.PackFrom(foo);
 ...
 if (any.UnpackTo(&foo)) {
   ...
 }

Example 2: Pack and unpack a message in Java.

 Foo foo = ...;
 Any any = Any.pack(foo);
 ...
 if (any.is(Foo.class)) {
   foo = any.unpack(Foo.class);
 }
 // or ...
 if (any.isSameTypeAs(Foo.getDefaultInstance())) {
   foo = any.unpack(Foo.getDefaultInstance());
 }

Example 3: Pack and unpack a message in Python.

 foo = Foo(...)
 any = Any()
 any.Pack(foo)
 ...
 if any.Is(Foo.DESCRIPTOR):
   any.Unpack(foo)
   ...

Example 4: Pack and unpack a message in Go

  foo := &pb.Foo{...}
  any, err := anypb.New(foo)
  if err != nil {
    ...
  }
  ...
  foo := &pb.Foo{}
  if err := any.UnmarshalTo(foo); err != nil {
    ...
  }

The pack methods provided by protobuf library will by default use ‘type.googleapis.com/full.type.name’ as the type URL and the unpack methods only use the fully qualified type name after the last ‘/’ in the type URL, for example “foo.bar.com/x/y.z” will yield type name “y.z”.

§JSON

The JSON representation of an Any value uses the regular representation of the deserialized, embedded message, with an additional field @type which contains the type URL. Example:

 package google.profile;
 message Person {
   string first_name = 1;
   string last_name = 2;
 }

 {
   "@type": "type.googleapis.com/google.profile.Person",
   "firstName": <string>,
   "lastName": <string>
 }

If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field value which holds the custom JSON in addition to the @type field. Example (for message [google.protobuf.Duration][]):

 {
   "@type": "type.googleapis.com/google.protobuf.Duration",
   "value": "1.212s"
 }

Fields§

§type_url: String

A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one “/” character. The last segment of the URL’s path must represent the fully qualified name of the type (as in path/google.protobuf.Duration). The name should be in a canonical form (e.g., leading “.” is not accepted).

In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http, https, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:

  • If no scheme is provided, https is assumed.
  • An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
  • Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)

Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.

Schemes other than http, https (or the empty scheme) might be used with implementation specific semantics.

§value: Vec<u8>

Must be a valid serialized protocol buffer of the above specified type.

Trait Implementations§

source§

impl BorshDeserialize for Any

source§

fn deserialize_reader<R>(reader: &mut R) -> Result<Any, Error>
where R: Read,

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

source§

impl BorshSerialize for Any

source§

fn serialize<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write,

source§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
source§

impl Clone for Any

source§

fn clone(&self) -> Any

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Any

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Decode for Any

source§

fn decode<I>(input: &mut I) -> Result<Any, Error>
where I: Input,

Attempt to deserialise the value from input.
source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl Default for Any

source§

fn default() -> Any

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Any

source§

fn deserialize<D>( deserializer: D ) -> Result<Any, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Encode for Any

source§

fn encode_to<T>(&self, writer: &mut T)
where T: Output + ?Sized,

Convert self to a slice and append it to the destination.
source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

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

Convert self to an owned vector.
source§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl From<ClientState> for Any

source§

fn from(client_state: ClientState) -> Any

Converts to this type from the input type.
source§

impl From<ClientState> for Any

source§

fn from(client_state: ClientState) -> Any

Converts to this type from the input type.
source§

impl From<ClientState> for Any

source§

fn from(value: ClientState) -> Any

Converts to this type from the input type.
source§

impl From<ConsensusState> for Any

source§

fn from(client_state: ConsensusState) -> Any

Converts to this type from the input type.
source§

impl From<ConsensusState> for Any

source§

fn from(consensus_state: ConsensusState) -> Any

Converts to this type from the input type.
source§

impl From<ConsensusState> for Any

source§

fn from(value: ConsensusState) -> Any

Converts to this type from the input type.
source§

impl From<Header> for Any

source§

fn from(header: Header) -> Any

Converts to this type from the input type.
source§

impl From<Misbehaviour> for Any

source§

fn from(misbehaviour: Misbehaviour) -> Any

Converts to this type from the input type.
source§

impl From<Plan> for Any

source§

fn from(value: Plan) -> Any

Converts to this type from the input type.
source§

impl JsonSchema for Any

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl Message for Any

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl Name for Any

source§

const NAME: &'static str = "Any"

Simple name for this Message. This name is the same as it appears in the source .proto file, e.g. FooBar.
source§

const PACKAGE: &'static str = "google.protobuf"

Package name this message type is contained in. They are domain-like and delimited by ., e.g. google.protobuf.
source§

fn full_name() -> String

Fully-qualified unique name for this Message. It’s prefixed with the package name and names of any parent messages, e.g. google.rpc.BadRequest.FieldViolation. By default, this is the package name followed by the message name. Fully-qualified names must be unique within a domain of Type URLs.
source§

fn type_url() -> String

Type URL for this Message, which by default is the full name with a leading slash, but may also include a leading domain name, e.g. type.googleapis.com/google.profile.Person. This can be used when serializing with the [Any] type.
source§

impl PartialEq for Any

source§

fn eq(&self, other: &Any) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Protobuf<Any> for ClientState

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for ClientState

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for ClientState

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for ConsensusState

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for ConsensusState

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for ConsensusState

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for Header

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for Misbehaviour

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Protobuf<Any> for Plan

source§

fn encode<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode into a buffer in Protobuf format. Read more
source§

fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>
where B: BufMut,

Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§

fn decode<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode an instance from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>
where B: Buf,

Constructor that attempts to decode a length-delimited instance from the buffer. Read more
source§

fn encoded_len(self) -> usize

Returns the encoded length of the message without a length delimiter. Read more
source§

fn encode_vec(self) -> Vec<u8>

Encodes into a Protobuf-encoded Vec<u8>.
source§

fn decode_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance from a Vec<u8> (or equivalent).
source§

fn encode_length_delimited_vec(self) -> Vec<u8>

Encode with a length-delimiter to a Vec<u8> Protobuf-encoded message.
source§

fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>

Constructor that attempts to decode a Protobuf-encoded instance with a length-delimiter from a Vec<u8> or equivalent.
source§

impl Serialize for Any

source§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<Any> for ClientState

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from( raw: Any ) -> Result<ClientState, <ClientState as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for ClientState

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from( raw: Any ) -> Result<ClientState, <ClientState as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for ClientState

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( any: Any ) -> Result<ClientState, <ClientState as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for ConsensusState

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from( raw: Any ) -> Result<ConsensusState, <ConsensusState as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for ConsensusState

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from( raw: Any ) -> Result<ConsensusState, <ConsensusState as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for ConsensusState

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from( any: Any ) -> Result<ConsensusState, <ConsensusState as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Header

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from(raw: Any) -> Result<Header, <Header as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Misbehaviour

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from(raw: Any) -> Result<Misbehaviour, ClientError>

Performs the conversion.
source§

impl TryFrom<Any> for MsgEnvelope

§

type Error = RouterError

The type returned in the event of a conversion error.
source§

fn try_from( any_msg: Any ) -> Result<MsgEnvelope, <MsgEnvelope as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for MsgTransfer

§

type Error = TokenTransferError

The type returned in the event of a conversion error.
source§

fn try_from( raw: Any ) -> Result<MsgTransfer, <MsgTransfer as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for MsgTransfer

§

type Error = NftTransferError

The type returned in the event of a conversion error.
source§

fn try_from( raw: Any ) -> Result<MsgTransfer, <MsgTransfer as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Plan

§

type Error = UpgradeClientError

The type returned in the event of a conversion error.
source§

fn try_from(any: Any) -> Result<Plan, <Plan as TryFrom<Any>>::Error>

Performs the conversion.
source§

impl TypeInfo for Any

§

type Identity = Any

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl Eq for Any

source§

impl StructuralPartialEq for Any

Auto Trait Implementations§

§

impl Freeze for Any

§

impl RefUnwindSafe for Any

§

impl Send for Any

§

impl Sync for Any

§

impl Unpin for Any

§

impl UnwindSafe for Any

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DecodeAll for T
where T: Decode,

source§

fn decode_all(input: &mut &[u8]) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
source§

impl<T> DecodeLimit for T
where T: Decode,

source§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8] ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
source§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>
where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> KeyedVec for T
where T: Codec,

source§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>

Return an encoding of Self prepended by given slice.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToVec for T
where T: Message,

source§

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<S> Codec for S
where S: Decode + Encode,

source§

impl<T, C> Convertible<C> for T
where T: TryFrom<C> + Into<C>,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> EncodeLike<&&T> for T
where T: Encode,

source§

impl<T> EncodeLike<&T> for T
where T: Encode,

source§

impl<T> EncodeLike<&mut T> for T
where T: Encode,

source§

impl<T> EncodeLike<Arc<T>> for T
where T: Encode,

source§

impl<T> EncodeLike<Box<T>> for T
where T: Encode,

source§

impl<'a, T> EncodeLike<Cow<'a, T>> for T
where T: ToOwned + Encode,

source§

impl<T> EncodeLike<Rc<T>> for T
where T: Encode,

source§

impl<T> JsonSchemaMaybe for T

source§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,