Struct jormungandr_lib::interfaces::blockdate::BlockDate
source · pub struct BlockDate(BlockDate);
Tuple Fields§
§0: BlockDate
Implementations§
source§impl BlockDate
impl BlockDate
pub fn new(epoch: Epoch, slot_id: SlotId) -> Self
pub fn next_epoch(self) -> Self
pub fn next(self, era: &TimeEra) -> Self
pub fn slot(&self) -> SlotId
pub fn epoch(&self) -> Epoch
pub fn time_era(&self, slots_in_epoch: u32) -> TimeEra
pub fn shift_epoch(&self, epoch_shift: u32) -> Self
pub fn shift_slot(&self, slot_shift: u32, time_era: &TimeEra) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for BlockDate
impl<'de> Deserialize<'de> for BlockDate
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 BlockDate
impl Ord for BlockDate
source§impl PartialEq<BlockDate> for BlockDate
impl PartialEq<BlockDate> for BlockDate
source§impl PartialOrd<BlockDate> for BlockDate
impl PartialOrd<BlockDate> for BlockDate
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for BlockDate
impl Eq for BlockDate
impl StructuralEq for BlockDate
impl StructuralPartialEq for BlockDate
Auto Trait Implementations§
impl RefUnwindSafe for BlockDate
impl Send for BlockDate
impl Sync for BlockDate
impl Unpin for BlockDate
impl UnwindSafe for BlockDate
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