pub struct RoundNumber(/* private fields */);Expand description
A round’s number.
Tendermint describes this as starting from 0, yet we start it from 1. This has two
benefits:
- It allows representing
None(our representation of what the paper describes as-1) as0, saving a byte in memory and encoding - It slightly simplifies calculating timeouts
Trait Implementations§
Source§impl BorshDeserialize for RoundNumber
Available on crate feature alloc only.
impl BorshDeserialize for RoundNumber
Available on crate feature
alloc only.fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for RoundNumber
Available on crate feature alloc only.
impl BorshSerialize for RoundNumber
Available on crate feature
alloc only.Source§impl Clone for RoundNumber
impl Clone for RoundNumber
impl Copy for RoundNumber
Source§impl Debug for RoundNumber
impl Debug for RoundNumber
impl Eq for RoundNumber
Source§impl From<RoundNumber> for u64
impl From<RoundNumber> for u64
Source§fn from(round_number: RoundNumber) -> Self
fn from(round_number: RoundNumber) -> Self
Converts to this type from the input type.
Source§impl Ord for RoundNumber
impl Ord for RoundNumber
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RoundNumber
impl PartialEq for RoundNumber
Source§impl PartialOrd for RoundNumber
impl PartialOrd for RoundNumber
impl StructuralPartialEq for RoundNumber
Auto Trait Implementations§
impl Freeze for RoundNumber
impl RefUnwindSafe for RoundNumber
impl Send for RoundNumber
impl Sync for RoundNumber
impl Unpin for RoundNumber
impl UnsafeUnpin for RoundNumber
impl UnwindSafe for RoundNumber
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