[−][src]Struct nimiq_block::Difficulty
Difficulty as FixedUnsigned with 10 decimal places
Trait Implementations
impl From<TargetCompact> for Difficulty
[src]
Convert TargetCompact
to Difficulty
fn from(target_compact: TargetCompact) -> Self
[src]
impl From<Target> for Difficulty
[src]
Convert Target
to Difficulty
impl From<Difficulty> for TargetCompact
[src]
XXX For testing only
fn from(difficulty: Difficulty) -> Self
[src]
impl From<Difficulty> for Target
[src]
XXX For testing only
fn from(difficulty: Difficulty) -> Self
[src]
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 i32
s.
XXX For testing only
fn from(x: i32) -> Difficulty
[src]
impl From<FixedUnsigned<FixedScale10>> for Difficulty
[src]
Convert a FixedUnsigned10
(10 decimal places) to Difficulty
fn from(fixed: FixedUnsigned10) -> Self
[src]
impl From<Difficulty> for FixedUnsigned10
[src]
fn from(difficulty: Difficulty) -> Self
[src]
impl From<u64> for Difficulty
[src]
XXX Only for debugging - or is it?
fn from(x: u64) -> Difficulty
[src]
impl From<u32> for Difficulty
[src]
Convert u32
to Difficulty
fn from(x: u32) -> Difficulty
[src]
impl Clone for Difficulty
[src]
fn clone(&self) -> Difficulty
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for Difficulty
[src]
fn default() -> Difficulty
[src]
impl Eq for Difficulty
[src]
impl Ord for Difficulty
[src]
fn cmp(&self, other: &Difficulty) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Difficulty> for Difficulty
[src]
fn eq(&self, other: &Difficulty) -> bool
[src]
fn ne(&self, other: &Difficulty) -> bool
[src]
impl PartialOrd<Difficulty> for Difficulty
[src]
fn partial_cmp(&self, other: &Difficulty) -> Option<Ordering>
[src]
fn lt(&self, other: &Difficulty) -> bool
[src]
fn le(&self, other: &Difficulty) -> bool
[src]
fn gt(&self, other: &Difficulty) -> bool
[src]
fn ge(&self, other: &Difficulty) -> bool
[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.
fn div(self, rhs: u32) -> Self::Output
[src]
impl Sub<Difficulty> for Difficulty
[src]
type Output = Difficulty
The resulting type after applying the -
operator.
fn sub(self, rhs: Difficulty) -> Difficulty
[src]
impl<'a, 'b> Sub<&'b Difficulty> for &'a Difficulty
[src]
type Output = Difficulty
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b Difficulty) -> Difficulty
[src]
impl Add<Difficulty> for Difficulty
[src]
type Output = Difficulty
The resulting type after applying the +
operator.
fn add(self, rhs: Difficulty) -> Difficulty
[src]
impl<'a, 'b> Add<&'b Difficulty> for &'a Difficulty
[src]
type Output = Difficulty
The resulting type after applying the +
operator.
fn add(self, rhs: &'b Difficulty) -> Difficulty
[src]
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
:
fn add_assign(&mut self, rhs: u32)
[src]
impl AddAssign<Difficulty> for Difficulty
[src]
fn add_assign(&mut self, rhs: Difficulty)
[src]
impl SubAssign<Difficulty> for Difficulty
[src]
fn sub_assign(&mut self, rhs: Difficulty)
[src]
impl StructuralPartialEq for Difficulty
[src]
impl StructuralEq for Difficulty
[src]
impl Deserialize for Difficulty
[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 Serialize for Difficulty
[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 Difficulty
impl Sync for Difficulty
impl Unpin for Difficulty
impl UnwindSafe for Difficulty
impl RefUnwindSafe for Difficulty
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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> 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,