pub struct MockConsensusState {
pub header: MockHeader,
/* private fields */
}Expand description
The mock consensus state type used within ibc-testkit for testing situations when a consensus state is required.
Note, this type slightly differs from the RawMockConsensusState type exposed by
ibc-proto. It contains a (private) root field to easily return a
reference to the mock consensus state’s dummy CommitmentRoot.
Fields§
§header: MockHeaderImplementations§
Trait Implementations§
Source§impl Clone for MockConsensusState
impl Clone for MockConsensusState
Source§fn clone(&self) -> MockConsensusState
fn clone(&self) -> MockConsensusState
Returns a duplicate 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§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(value: MockConsensusState) -> Self
fn from(value: MockConsensusState) -> Self
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 From<MockHeader> for MockConsensusState
impl From<MockHeader> for MockConsensusState
Source§fn from(block: MockHeader) -> Self
fn from(block: MockHeader) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MockConsensusState
impl PartialEq for MockConsensusState
Source§impl Protobuf<Any> for MockConsensusState
impl Protobuf<Any> for MockConsensusState
Source§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
Source§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
Source§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
Source§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
Source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
Source§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).Source§impl Protobuf<ConsensusState> for MockConsensusState
impl Protobuf<ConsensusState> for MockConsensusState
Source§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
Source§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
Source§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
Source§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
Source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
Source§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).Source§impl Serialize for MockConsensusState
impl Serialize for MockConsensusState
Source§impl TryFrom<Any> for MockConsensusState
impl TryFrom<Any> for MockConsensusState
Source§impl TryFrom<AnyConsensusState> for MockConsensusState
impl TryFrom<AnyConsensusState> for MockConsensusState
Source§type Error = DecodingError
type Error = DecodingError
The type returned in the event of a conversion error.
Source§impl TryFrom<ConsensusState> for MockConsensusState
impl TryFrom<ConsensusState> for MockConsensusState
Source§type Error = DecodingError
type Error = DecodingError
The type returned in the event of a conversion error.
impl Eq for MockConsensusState
impl StructuralPartialEq for MockConsensusState
Auto Trait Implementations§
impl Freeze for MockConsensusState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request