Struct ckb_std::since::EpochNumberWithFraction
source · pub struct EpochNumberWithFraction(_);Implementations§
source§impl EpochNumberWithFraction
impl EpochNumberWithFraction
pub const NUMBER_OFFSET: usize = 0usize
pub const NUMBER_BITS: usize = 24usize
pub const NUMBER_MAXIMUM_VALUE: u64 = 16_777_216u64
pub const NUMBER_MASK: u64 = 16_777_215u64
pub const INDEX_OFFSET: usize = 24usize
pub const INDEX_BITS: usize = 16usize
pub const INDEX_MAXIMUM_VALUE: u64 = 65_536u64
pub const INDEX_MASK: u64 = 65_535u64
pub const LENGTH_OFFSET: usize = 40usize
pub const LENGTH_BITS: usize = 16usize
pub const LENGTH_MAXIMUM_VALUE: u64 = 65_536u64
pub const LENGTH_MASK: u64 = 65_535u64
pub fn new(number: u64, index: u64, length: u64) -> EpochNumberWithFraction
pub const fn new_unchecked(number: u64, index: u64, length: u64) -> Self
pub fn number(self) -> u64
pub fn index(self) -> u64
pub fn length(self) -> u64
pub fn full_value(self) -> u64
pub fn from_full_value(value: u64) -> Self
Trait Implementations§
source§impl Clone for EpochNumberWithFraction
impl Clone for EpochNumberWithFraction
source§fn clone(&self) -> EpochNumberWithFraction
fn clone(&self) -> EpochNumberWithFraction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for EpochNumberWithFraction
impl Debug for EpochNumberWithFraction
source§impl Default for EpochNumberWithFraction
impl Default for EpochNumberWithFraction
source§fn default() -> EpochNumberWithFraction
fn default() -> EpochNumberWithFraction
Returns the “default value” for a type. Read more
source§impl Hash for EpochNumberWithFraction
impl Hash for EpochNumberWithFraction
source§impl PartialEq<EpochNumberWithFraction> for EpochNumberWithFraction
impl PartialEq<EpochNumberWithFraction> for EpochNumberWithFraction
source§fn eq(&self, other: &EpochNumberWithFraction) -> bool
fn eq(&self, other: &EpochNumberWithFraction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.