pub struct MockHeader {
pub height: Height,
pub timestamp: Timestamp,
}
Fields§
§height: Height
§timestamp: Timestamp
Implementations§
Source§impl MockHeader
impl MockHeader
Trait Implementations§
Source§impl Clone for MockHeader
impl Clone for MockHeader
Source§fn clone(&self) -> MockHeader
fn clone(&self) -> MockHeader
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 Debug for MockHeader
impl Debug for MockHeader
Source§impl Default for MockHeader
impl Default for MockHeader
Source§impl<'de> Deserialize<'de> for MockHeader
impl<'de> Deserialize<'de> for MockHeader
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 Display for MockHeader
impl Display for MockHeader
Source§impl From<MockHeader> for Any
impl From<MockHeader> for Any
Source§fn from(header: MockHeader) -> Self
fn from(header: MockHeader) -> Self
Converts to this type from the input type.
Source§impl From<MockHeader> for Header
impl From<MockHeader> for Header
Source§fn from(value: MockHeader) -> Self
fn from(value: MockHeader) -> 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 MockHeader
impl PartialEq for MockHeader
Source§impl Protobuf<Any> for MockHeader
impl Protobuf<Any> for MockHeader
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<Header> for MockHeader
impl Protobuf<Header> for MockHeader
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 MockHeader
impl Serialize for MockHeader
Source§impl TestBlock for MockHeader
impl TestBlock for MockHeader
Source§type Header = MockHeader
type Header = MockHeader
The type of header can be extracted from the block.
Source§fn into_header_with_trusted(self, _trusted_block: &Self) -> Self::Header
fn into_header_with_trusted(self, _trusted_block: &Self) -> Self::Header
Extract the IBC header using the target and trusted blocks.
Source§fn into_header(self) -> Self::Header
fn into_header(self) -> Self::Header
Extract the IBC header only using the target block (sets the trusted
block to itself).
Source§impl TestHeader for MockHeader
impl TestHeader for MockHeader
Source§type ConsensusState = MockConsensusState
type ConsensusState = MockConsensusState
The type of consensus state can be extracted from the header.
Source§fn into_consensus_state(self) -> Self::ConsensusState
fn into_consensus_state(self) -> Self::ConsensusState
Extract the consensus state from the header.
Source§impl TryFrom<Any> for MockHeader
impl TryFrom<Any> for MockHeader
Source§impl TryFrom<Header> for MockHeader
impl TryFrom<Header> for MockHeader
Source§type Error = DecodingError
type Error = DecodingError
The type returned in the event of a conversion error.
impl Copy for MockHeader
impl Eq for MockHeader
impl StructuralPartialEq for MockHeader
Auto Trait Implementations§
impl Freeze for MockHeader
impl RefUnwindSafe for MockHeader
impl Send for MockHeader
impl Sync for MockHeader
impl Unpin for MockHeader
impl UnwindSafe for MockHeader
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