[][src]Struct nimiq_block::Difficulty

pub struct Difficulty(_);

Difficulty as FixedUnsigned with 10 decimal places

Trait Implementations

impl From<TargetCompact> for Difficulty[src]

Convert TargetCompact to Difficulty

impl From<Target> for Difficulty[src]

Convert Target to Difficulty

impl From<Difficulty> for TargetCompact[src]

XXX For testing only

impl From<Difficulty> for Target[src]

XXX For testing only

impl From<i32> for Difficulty[src]

Converts a i32 to a Difficulty

NOTE: This is just to please the old test gods, because the tests were implemented with positive i32s.

XXX For testing only

impl From<FixedUnsigned<FixedScale10>> for Difficulty[src]

Convert a FixedUnsigned10 (10 decimal places) to Difficulty

impl From<Difficulty> for FixedUnsigned10[src]

impl From<u64> for Difficulty[src]

XXX Only for debugging - or is it?

impl From<u32> for Difficulty[src]

Convert u32 to Difficulty

impl Clone for Difficulty[src]

impl Default for Difficulty[src]

impl Eq for Difficulty[src]

impl Ord for Difficulty[src]

impl PartialEq<Difficulty> for Difficulty[src]

impl PartialOrd<Difficulty> for Difficulty[src]

impl Display for Difficulty[src]

impl Debug for Difficulty[src]

impl Div<u32> for Difficulty[src]

Divide Difficulty by u32

This is used in Blockchain::get_next_target

NOTE: I chose to implement exactly those traits with these types to abstract away how Difficulty works from the Blockchain

type Output = Difficulty

The resulting type after applying the / operator.

impl Sub<Difficulty> for Difficulty[src]

type Output = Difficulty

The resulting type after applying the - operator.

impl<'a, 'b> Sub<&'b Difficulty> for &'a Difficulty[src]

type Output = Difficulty

The resulting type after applying the - operator.

impl Add<Difficulty> for Difficulty[src]

type Output = Difficulty

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'b Difficulty> for &'a Difficulty[src]

type Output = Difficulty

The resulting type after applying the + operator.

impl AddAssign<u32> for Difficulty[src]

Add a u32 onto a Difficulty

This is used in Blockchain::get_next_target to compute the delta_total_difficulty:

impl AddAssign<Difficulty> for Difficulty[src]

impl SubAssign<Difficulty> for Difficulty[src]

impl StructuralPartialEq for Difficulty[src]

impl StructuralEq for Difficulty[src]

impl Deserialize for Difficulty[src]

impl Serialize for Difficulty[src]

Auto Trait Implementations

Blanket Implementations

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

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> ToString for T where
    T: Display + ?Sized
[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> 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

impl<T> Erased for T