Enum ibc::core::ics04_channel::timeout::TimeoutHeight
source · [−]pub enum TimeoutHeight {
Never,
At(Height),
}
Expand description
Indicates a consensus height on the destination chain after which the packet will no longer be processed, and will instead count as having timed-out.
TimeoutHeight
is treated differently from other heights because
RawHeight.timeout_height == {revision_number: 0, revision_height = 0}
is legal and meaningful, even though the Tendermint spec rejects this height as invalid. Thus, it must be parsed specially, where this special case means “no timeout”.
Variants
Never
At(Height)
Implementations
sourceimpl TimeoutHeight
impl TimeoutHeight
pub fn no_timeout() -> Self
sourcepub fn commitment_revision_number(&self) -> u64
pub fn commitment_revision_number(&self) -> u64
Revision number to be used in packet commitment computation
sourcepub fn commitment_revision_height(&self) -> u64
pub fn commitment_revision_height(&self) -> u64
Revision height to be used in packet commitment computation
sourcepub fn has_expired(&self, height: Height) -> bool
pub fn has_expired(&self, height: Height) -> bool
Check if a height is stricly past the timeout height, and thus is deemed expired.
Trait Implementations
sourceimpl Clone for TimeoutHeight
impl Clone for TimeoutHeight
sourcefn clone(&self) -> TimeoutHeight
fn clone(&self) -> TimeoutHeight
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 TimeoutHeight
impl Debug for TimeoutHeight
sourceimpl Default for TimeoutHeight
impl Default for TimeoutHeight
sourceimpl<'de> Deserialize<'de> for TimeoutHeight
impl<'de> Deserialize<'de> for TimeoutHeight
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 Display for TimeoutHeight
impl Display for TimeoutHeight
sourceimpl From<Height> for TimeoutHeight
impl From<Height> for TimeoutHeight
sourceimpl From<TimeoutHeight> for Option<RawHeight>
impl From<TimeoutHeight> for Option<RawHeight>
We map “no timeout height” to Some(RawHeight::zero)
due to a quirk
in ICS-4. See https://github.com/cosmos/ibc/issues/776.
sourcefn from(timeout_height: TimeoutHeight) -> Self
fn from(timeout_height: TimeoutHeight) -> Self
Converts to this type from the input type.
sourceimpl From<TimeoutHeight> for TagValue
impl From<TimeoutHeight> for TagValue
sourcefn from(timeout_height: TimeoutHeight) -> Self
fn from(timeout_height: TimeoutHeight) -> Self
Converts to this type from the input type.
sourceimpl Hash for TimeoutHeight
impl Hash for TimeoutHeight
sourceimpl PartialEq<TimeoutHeight> for TimeoutHeight
impl PartialEq<TimeoutHeight> for TimeoutHeight
sourcefn eq(&self, other: &TimeoutHeight) -> bool
fn eq(&self, other: &TimeoutHeight) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for TimeoutHeight
impl Serialize for TimeoutHeight
sourceimpl TryFrom<Height> for TimeoutHeight
impl TryFrom<Height> for TimeoutHeight
sourceimpl TryFrom<Option<Height>> for TimeoutHeight
impl TryFrom<Option<Height>> for TimeoutHeight
impl Copy for TimeoutHeight
impl Eq for TimeoutHeight
impl StructuralEq for TimeoutHeight
impl StructuralPartialEq for TimeoutHeight
Auto Trait Implementations
impl RefUnwindSafe for TimeoutHeight
impl Send for TimeoutHeight
impl Sync for TimeoutHeight
impl Unpin for TimeoutHeight
impl UnwindSafe for TimeoutHeight
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