pub struct Epoch(pub u128);Tuple Fields§
§0: u128Implementations§
Source§impl Epoch
impl Epoch
pub const ZERO: Epoch
Sourcepub fn to_wire(self) -> (u64, u64)
pub fn to_wire(self) -> (u64, u64)
Split into (hi, lo) 64-bit halves for the two-uint64 wire form.
hi is the more significant half, so lexicographic (hi, lo)
comparison equals numeric u128 comparison.
Sourcepub fn from_wire(hi: u64, lo: u64) -> Self
pub fn from_wire(hi: u64, lo: u64) -> Self
Reassemble from the (hi, lo) halves produced by Self::to_wire.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Epoch
impl<'de> Deserialize<'de> for Epoch
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 Epoch
impl Ord for Epoch
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
Source§impl PartialOrd for Epoch
impl PartialOrd for Epoch
impl Copy for Epoch
impl Eq for Epoch
impl StructuralPartialEq for Epoch
Auto Trait Implementations§
impl Freeze for Epoch
impl RefUnwindSafe for Epoch
impl Send for Epoch
impl Sync for Epoch
impl Unpin for Epoch
impl UnsafeUnpin for Epoch
impl UnwindSafe for Epoch
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