[−][src]Struct nimiq_blockchain::super_block_counts::SuperBlockCounts
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]
fn eq(&self, other: &SuperBlockCounts) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl From<Vec<u32>> for SuperBlockCounts
[src]
fn from(counts: Vec<u32>) -> SuperBlockCounts
[src]
impl Clone for SuperBlockCounts
[src]
fn clone(&self) -> 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]
fn default() -> SuperBlockCounts
[src]
impl Eq for SuperBlockCounts
[src]
impl Debug for SuperBlockCounts
[src]
impl Deserialize for SuperBlockCounts
[src]
fn deserialize<R: ReadBytesExt>(
reader: &mut R
) -> Result<Self, SerializingError>
[src]
reader: &mut R
) -> Result<Self, SerializingError>
fn deserialize_from_vec(v: &Vec<u8>) -> Result<Self, SerializingError>
[src]
impl FromDatabaseValue for SuperBlockCounts
[src]
impl IntoDatabaseValue for SuperBlockCounts
[src]
fn database_byte_size(&self) -> usize
[src]
fn copy_into_database(&self, bytes: &mut [u8])
[src]
impl Serialize for SuperBlockCounts
[src]
fn serialize<W: WriteBytesExt>(
&self,
writer: &mut W
) -> Result<usize, SerializingError>
[src]
&self,
writer: &mut W
) -> Result<usize, SerializingError>
fn serialized_size(&self) -> usize
[src]
fn serialize_to_vec(&self) -> Vec<u8>
[src]
Auto Trait Implementations
impl Send for SuperBlockCounts
impl Sync for SuperBlockCounts
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Send + Sync + Clone,
T: 'a + Send + Sync + Clone,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,