Enum ibc::core::ics02_client::client_state::AnyClientState
source · [−]pub enum AnyClientState {
Tendermint(ClientState),
Mock(MockClientState),
}
Variants
Tendermint(ClientState)
Mock(MockClientState)
Implementations
sourceimpl AnyClientState
impl AnyClientState
pub fn latest_height(&self) -> Height
pub fn frozen_height(&self) -> Option<Height>
pub fn trust_threshold(&self) -> Option<TrustThreshold>
pub fn max_clock_drift(&self) -> Duration
pub fn client_type(&self) -> ClientType
pub fn refresh_period(&self) -> Option<Duration>
pub fn expired(&self, elapsed_since_latest: Duration) -> bool
Trait Implementations
sourceimpl ClientState for AnyClientState
impl ClientState for AnyClientState
type UpgradeOptions = AnyUpgradeOptions
type UpgradeOptions = AnyUpgradeOptions
Client-specific options for upgrading the client
sourcefn chain_id(&self) -> ChainId
fn chain_id(&self) -> ChainId
Return the chain identifier which this client is serving (i.e., the client is verifying consensus states from this chain). Read more
sourcefn client_type(&self) -> ClientType
fn client_type(&self) -> ClientType
Type of client associated with this state (eg. Tendermint)
sourcefn latest_height(&self) -> Height
fn latest_height(&self) -> Height
Latest height of consensus state
sourcefn frozen_height(&self) -> Option<Height>
fn frozen_height(&self) -> Option<Height>
Frozen height of the client
sourcefn upgrade(
self,
upgrade_height: Height,
upgrade_options: Self::UpgradeOptions,
chain_id: ChainId
) -> Self
fn upgrade(
self,
upgrade_height: Height,
upgrade_options: Self::UpgradeOptions,
chain_id: ChainId
) -> Self
Helper function to verify the upgrade client procedure. Resets all fields except the blockchain-specific ones, and updates the given fields. Read more
sourcefn wrap_any(self) -> AnyClientState
fn wrap_any(self) -> AnyClientState
Wrap into an AnyClientState
sourceimpl Clone for AnyClientState
impl Clone for AnyClientState
sourcefn clone(&self) -> AnyClientState
fn clone(&self) -> AnyClientState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AnyClientState
impl Debug for AnyClientState
sourceimpl<'de> Deserialize<'de> for AnyClientState
impl<'de> Deserialize<'de> for AnyClientState
sourcefn 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
sourceimpl From<AnyClientState> for Any
impl From<AnyClientState> for Any
sourcefn from(value: AnyClientState) -> Self
fn from(value: AnyClientState) -> Self
Converts to this type from the input type.
sourceimpl From<MockClientState> for AnyClientState
impl From<MockClientState> for AnyClientState
sourcefn from(mcs: MockClientState) -> Self
fn from(mcs: MockClientState) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<AnyClientState> for AnyClientState
impl PartialEq<AnyClientState> for AnyClientState
sourcefn eq(&self, other: &AnyClientState) -> bool
fn eq(&self, other: &AnyClientState) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Protobuf<Any> for AnyClientState
impl Protobuf<Any> for AnyClientState
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
sourcefn encode_vec(&self) -> Result<Vec<u8, Global>, Error>
fn encode_vec(&self) -> Result<Vec<u8, Global>, Error>
Encodes into a Protobuf-encoded Vec<u8>
.
sourcefn 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). Read more
sourceimpl Serialize for AnyClientState
impl Serialize for AnyClientState
sourceimpl TryFrom<Any> for AnyClientState
impl TryFrom<Any> for AnyClientState
impl Eq for AnyClientState
impl StructuralEq for AnyClientState
impl StructuralPartialEq for AnyClientState
Auto Trait Implementations
impl RefUnwindSafe for AnyClientState
impl Send for AnyClientState
impl Sync for AnyClientState
impl Unpin for AnyClientState
impl UnwindSafe for AnyClientState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more