pub struct Round(pub Option<u32>);Expand description
A round number (or None if the round is nil).
This type represents a consensus round number. A round can be either a specific round number or nil (None), which represents a special state in the consensus protocol.
§Example
let round = Round::new(5); // Round 5
let nil_round = Round::nil(); // Nil roundTuple Fields§
§0: Option<u32>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Round
impl<'de> Deserialize<'de> for Round
Source§fn 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
Source§impl Ord for Round
impl Ord for Round
Source§impl PartialOrd for Round
impl PartialOrd for Round
impl Eq for Round
impl StructuralPartialEq for Round
Auto Trait Implementations§
impl Freeze for Round
impl RefUnwindSafe for Round
impl Send for Round
impl Sync for Round
impl Unpin for Round
impl UnwindSafe for Round
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