Enum TimeoutHeight
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§
Implementations§
§impl TimeoutHeight
impl TimeoutHeight
pub fn no_timeout() -> TimeoutHeight
pub fn commitment_revision_number(&self) -> u64
pub fn commitment_revision_number(&self) -> u64
Revision number to be used in packet commitment computation
pub fn commitment_revision_height(&self) -> u64
pub fn commitment_revision_height(&self) -> u64
Revision height to be used in packet commitment computation
pub 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.
pub fn to_event_attribute_value(self) -> String
pub fn to_event_attribute_value(self) -> String
Returns a string formatted for an ABCI event attribute value.
Trait Implementations§
§impl Clone for TimeoutHeight
impl Clone for TimeoutHeight
§fn clone(&self) -> TimeoutHeight
fn clone(&self) -> TimeoutHeight
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 more§impl Debug for TimeoutHeight
impl Debug for TimeoutHeight
§impl Default for TimeoutHeight
impl Default for TimeoutHeight
§fn default() -> TimeoutHeight
fn default() -> TimeoutHeight
Returns the “default value” for a type. Read more
§impl Display for TimeoutHeight
impl Display for TimeoutHeight
§impl From<Height> for TimeoutHeight
impl From<Height> for TimeoutHeight
§fn from(height: Height) -> TimeoutHeight
fn from(height: Height) -> TimeoutHeight
Converts to this type from the input type.
§impl FromStr for TimeoutHeight
impl FromStr for TimeoutHeight
§impl Hash for TimeoutHeight
impl Hash for TimeoutHeight
§impl PartialEq for TimeoutHeight
impl PartialEq for TimeoutHeight
§impl TryFrom<Height> for TimeoutHeight
impl TryFrom<Height> for TimeoutHeight
§fn try_from(
raw_height: Height,
) -> Result<TimeoutHeight, <TimeoutHeight as TryFrom<Height>>::Error>
fn try_from( raw_height: Height, ) -> Result<TimeoutHeight, <TimeoutHeight as TryFrom<Height>>::Error>
Performs the conversion.
§impl TryFrom<Option<Height>> for TimeoutHeight
impl TryFrom<Option<Height>> for TimeoutHeight
impl Copy for TimeoutHeight
impl Eq for TimeoutHeight
impl StructuralPartialEq for TimeoutHeight
Auto Trait Implementations§
impl Freeze for TimeoutHeight
impl RefUnwindSafe for TimeoutHeight
impl Send for TimeoutHeight
impl Sync for TimeoutHeight
impl Unpin for TimeoutHeight
impl UnwindSafe for TimeoutHeight
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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