Struct ckb_std::since::EpochNumberWithFraction
source · [−]pub struct EpochNumberWithFraction(_);Implementations
sourceimpl 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
sourceimpl Clone for EpochNumberWithFraction
impl Clone for EpochNumberWithFraction
sourcefn clone(&self) -> EpochNumberWithFraction
fn clone(&self) -> EpochNumberWithFraction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for EpochNumberWithFraction
impl Debug for EpochNumberWithFraction
sourceimpl Default for EpochNumberWithFraction
impl Default for EpochNumberWithFraction
sourcefn default() -> EpochNumberWithFraction
fn default() -> EpochNumberWithFraction
Returns the “default value” for a type. Read more
sourceimpl Hash for EpochNumberWithFraction
impl Hash for EpochNumberWithFraction
sourceimpl PartialEq<EpochNumberWithFraction> for EpochNumberWithFraction
impl PartialEq<EpochNumberWithFraction> for EpochNumberWithFraction
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &EpochNumberWithFraction) -> bool
fn ne(&self, other: &EpochNumberWithFraction) -> bool
This method tests for !=.
impl Copy for EpochNumberWithFraction
impl Eq for EpochNumberWithFraction
impl StructuralEq for EpochNumberWithFraction
impl StructuralPartialEq for EpochNumberWithFraction
Auto Trait Implementations
impl RefUnwindSafe for EpochNumberWithFraction
impl Send for EpochNumberWithFraction
impl Sync for EpochNumberWithFraction
impl Unpin for EpochNumberWithFraction
impl UnwindSafe for EpochNumberWithFraction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more