Struct ibc::ics02_client::height::Height [−][src]
Fields
revision_number: u64
Previously known as “epoch”
revision_height: u64
The height of a block
Implementations
impl Height
[src]
pub fn new(revision_number: u64, revision_height: u64) -> Self
[src]
pub fn zero() -> Height
[src]
pub fn is_zero(&self) -> bool
[src]
pub fn add(&self, delta: u64) -> Height
[src]
pub fn increment(&self) -> Height
[src]
pub fn sub(&self, delta: u64) -> Result<Height, Error>
[src]
pub fn decrement(&self) -> Result<Height, Error>
[src]
pub fn with_revision_height(self, revision_height: u64) -> Height
[src]
Trait Implementations
impl Clone for Height
[src]
impl Copy for Height
[src]
impl Debug for Height
[src]
impl Default for Height
[src]
impl<'de> Deserialize<'de> for Height
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Height
[src]
Custom debug output to omit the packet data
impl Eq for Height
[src]
impl FromStr for Height
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Error>
[src]
impl Hash for Height
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Height
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Height> for Height
[src]
impl PartialOrd<Height> for Height
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Protobuf<Height> for Height
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), Error<Kind>> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), Error<Kind>> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, Error<Kind>> where
B: Buf,
[src]
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, Error<Kind>> where
B: Buf,
[src]
B: Buf,
pub fn encoded_len(&self) -> usize
[src]
pub fn encode_vec(&self) -> Result<Vec<u8, Global>, Error<Kind>>
[src]
pub fn decode_vec(v: &[u8]) -> Result<Self, Error<Kind>>
[src]
pub fn encode_length_delimited_vec(
&self
) -> Result<Vec<u8, Global>, Error<Kind>>
[src]
&self
) -> Result<Vec<u8, Global>, Error<Kind>>
pub fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error<Kind>>
[src]
impl Serialize for Height
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Height
[src]
impl StructuralPartialEq for Height
[src]
impl TryFrom<&'_ str> for Height
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &str) -> Result<Self, Self::Error>
[src]
impl TryFrom<Height> for Height
[src]
Auto Trait Implementations
impl RefUnwindSafe for Height
impl Send for Height
impl Sync for Height
impl Unpin for Height
impl UnwindSafe for Height
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,