[][src]Struct nimiq_blockchain::super_block_counts::SuperBlockCounts

pub struct SuperBlockCounts { /* fields omitted */ }

Keeps track of the number of superblocks at each level

Methods

impl SuperBlockCounts[src]

pub const NUM_COUNTS: usize[src]

pub fn zero() -> SuperBlockCounts[src]

Create a new SuperBlockCounts with all levels set to 0

pub fn add(&mut self, depth: u8)[src]

Increments the superblock count for depth

pub fn subtract(&mut self, depth: u8)[src]

Decrements the superblock count for depth

pub fn copy_and_add(&self, depth: u8) -> SuperBlockCounts[src]

Increments the superblock count for depth and returns the result in a new SuperBlockCounts

pub fn copy_and_subtract(&self, depth: u8) -> SuperBlockCounts[src]

Decrements the superblock count for depth and returns the result in a new SuperBlockCounts

pub fn get(&self, depth: u8) -> u32[src]

Returns the super block count at depth

pub fn get_candidate_depth(&self, m: u32) -> u8[src]

Trait Implementations

impl PartialEq<SuperBlockCounts> for SuperBlockCounts[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl From<Vec<u32>> for SuperBlockCounts[src]

impl Clone for SuperBlockCounts[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for SuperBlockCounts[src]

impl Eq for SuperBlockCounts[src]

impl Debug for SuperBlockCounts[src]

impl Deserialize for SuperBlockCounts[src]

fn deserialize_from_vec(v: &Vec<u8>) -> Result<Self, SerializingError>[src]

impl FromDatabaseValue for SuperBlockCounts[src]

impl IntoDatabaseValue for SuperBlockCounts[src]

impl Serialize for SuperBlockCounts[src]

fn serialize_to_vec(&self) -> Vec<u8>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Send + Sync + Clone

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default