Struct ibc_testkit::testapp::ibc::clients::mock::consensus_state::MockConsensusState
source · pub struct MockConsensusState {
pub header: MockHeader,
pub root: CommitmentRoot,
}Fields§
§header: MockHeader§root: CommitmentRootImplementations§
source§impl MockConsensusState
impl MockConsensusState
pub fn new(header: MockHeader) -> Self
pub fn timestamp(&self) -> Timestamp
Trait Implementations§
source§impl Clone for MockConsensusState
impl Clone for MockConsensusState
source§fn clone(&self) -> MockConsensusState
fn clone(&self) -> MockConsensusState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl ConsensusState for MockConsensusState
impl ConsensusState for MockConsensusState
source§fn root(&self) -> &CommitmentRoot
fn root(&self) -> &CommitmentRoot
Commitment root of the consensus state, which is used for key-value pair verification.
source§fn encode_vec(self) -> Vec<u8>
fn encode_vec(self) -> Vec<u8>
Serializes the
ConsensusState. This is expected to be implemented as
first converting to the raw type (i.e. the protobuf definition), and then
serializing that.source§impl Debug for MockConsensusState
impl Debug for MockConsensusState
source§impl<'de> Deserialize<'de> for MockConsensusState
impl<'de> Deserialize<'de> for MockConsensusState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<MockConsensusState> for Any
impl From<MockConsensusState> for Any
source§fn from(consensus_state: MockConsensusState) -> Self
fn from(consensus_state: MockConsensusState) -> Self
Converts to this type from the input type.
source§impl From<MockConsensusState> for AnyConsensusState
impl From<MockConsensusState> for AnyConsensusState
source§fn from(original: MockConsensusState) -> AnyConsensusState
fn from(original: MockConsensusState) -> AnyConsensusState
Converts to this type from the input type.
source§impl From<MockConsensusState> for ConsensusState
impl From<MockConsensusState> for ConsensusState
source§fn from(value: MockConsensusState) -> Self
fn from(value: MockConsensusState) -> Self
Converts to this type from the input type.
source§impl From<MockConsensusState> for MockClientState
impl From<MockConsensusState> for MockClientState
source§fn from(cs: MockConsensusState) -> Self
fn from(cs: MockConsensusState) -> Self
Converts to this type from the input type.
source§impl PartialEq for MockConsensusState
impl PartialEq for MockConsensusState
source§fn eq(&self, other: &MockConsensusState) -> bool
fn eq(&self, other: &MockConsensusState) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Protobuf<Any> for MockConsensusState
impl Protobuf<Any> for MockConsensusState
§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
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
§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
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
§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
§fn encode_vec(self) -> Vec<u8>
fn encode_vec(self) -> Vec<u8>
Encodes into a Protobuf-encoded
Vec<u8>.§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8> (or equivalent).§fn encode_length_delimited_vec(self) -> Vec<u8>
fn encode_length_delimited_vec(self) -> Vec<u8>
Encode with a length-delimiter to a
Vec<u8> Protobuf-encoded message.§fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>
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<ConsensusState> for MockConsensusState
impl Protobuf<ConsensusState> for MockConsensusState
§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
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
§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
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
§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
§fn encode_vec(self) -> Vec<u8>
fn encode_vec(self) -> Vec<u8>
Encodes into a Protobuf-encoded
Vec<u8>.§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8> (or equivalent).§fn encode_length_delimited_vec(self) -> Vec<u8>
fn encode_length_delimited_vec(self) -> Vec<u8>
Encode with a length-delimiter to a
Vec<u8> Protobuf-encoded message.§fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>
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 MockConsensusState
impl Serialize for MockConsensusState
source§impl TryFrom<Any> for MockConsensusState
impl TryFrom<Any> for MockConsensusState
source§impl TryFrom<ConsensusState> for MockConsensusState
impl TryFrom<ConsensusState> for MockConsensusState
impl Eq for MockConsensusState
impl StructuralEq for MockConsensusState
impl StructuralPartialEq for MockConsensusState
Auto Trait Implementations§
impl RefUnwindSafe for MockConsensusState
impl Send for MockConsensusState
impl Sync for MockConsensusState
impl Unpin for MockConsensusState
impl UnwindSafe for MockConsensusState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more