Struct grin_core::pow::Difficulty [−][src]
pub struct Difficulty { /* fields omitted */ }
The difficulty is defined as the maximum target divided by the block hash.
Implementations
impl Difficulty
[src]
impl Difficulty
[src]pub fn zero() -> Difficulty
[src]
pub fn zero() -> Difficulty
[src]Difficulty of zero, which is invalid (no target can be calculated from it) but very useful as a start for additions.
pub fn min_dma() -> Difficulty
[src]
pub fn min_dma() -> Difficulty
[src]Difficulty of MIN_DIFFICULTY
pub fn min_wtema() -> Difficulty
[src]
pub fn min_wtema() -> Difficulty
[src]Difficulty of MIN_DIFFICULTY
pub fn unit() -> Difficulty
[src]
pub fn unit() -> Difficulty
[src]Difficulty unit, which is the graph weight of minimal graph
pub fn from_num(num: u64) -> Difficulty
[src]
pub fn from_num(num: u64) -> Difficulty
[src]Convert a u32
into a Difficulty
impl Difficulty
[src]
impl Difficulty
[src]Trait Implementations
impl Add<Difficulty> for Difficulty
[src]
impl Add<Difficulty> for Difficulty
[src]type Output = Difficulty
type Output = Difficulty
The resulting type after applying the +
operator.
fn add(self, other: Difficulty) -> Difficulty
[src]
fn add(self, other: Difficulty) -> Difficulty
[src]Performs the +
operation. Read more
impl Clone for Difficulty
[src]
impl Clone for Difficulty
[src]fn clone(&self) -> Difficulty
[src]
fn clone(&self) -> Difficulty
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for Difficulty
[src]
impl Debug for Difficulty
[src]impl<'de> Deserialize<'de> for Difficulty
[src]
impl<'de> Deserialize<'de> for Difficulty
[src]fn deserialize<D>(deserializer: D) -> Result<Difficulty, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Difficulty, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Display for Difficulty
[src]
impl Display for Difficulty
[src]impl Div<Difficulty> for Difficulty
[src]
impl Div<Difficulty> for Difficulty
[src]type Output = Difficulty
type Output = Difficulty
The resulting type after applying the /
operator.
fn div(self, other: Difficulty) -> Difficulty
[src]
fn div(self, other: Difficulty) -> Difficulty
[src]Performs the /
operation. Read more
impl Mul<Difficulty> for Difficulty
[src]
impl Mul<Difficulty> for Difficulty
[src]type Output = Difficulty
type Output = Difficulty
The resulting type after applying the *
operator.
fn mul(self, other: Difficulty) -> Difficulty
[src]
fn mul(self, other: Difficulty) -> Difficulty
[src]Performs the *
operation. Read more
impl Ord for Difficulty
[src]
impl Ord for Difficulty
[src]impl PartialEq<Difficulty> for Difficulty
[src]
impl PartialEq<Difficulty> for Difficulty
[src]fn eq(&self, other: &Difficulty) -> bool
[src]
fn eq(&self, other: &Difficulty) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &Difficulty) -> bool
[src]
fn ne(&self, other: &Difficulty) -> bool
[src]This method tests for !=
.
impl PartialOrd<Difficulty> for Difficulty
[src]
impl PartialOrd<Difficulty> for Difficulty
[src]fn partial_cmp(&self, other: &Difficulty) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Difficulty) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Readable for Difficulty
[src]
impl Readable for Difficulty
[src]impl Serialize for Difficulty
[src]
impl Serialize for Difficulty
[src]impl Sub<Difficulty> for Difficulty
[src]
impl Sub<Difficulty> for Difficulty
[src]type Output = Difficulty
type Output = Difficulty
The resulting type after applying the -
operator.
fn sub(self, other: Difficulty) -> Difficulty
[src]
fn sub(self, other: Difficulty) -> Difficulty
[src]Performs the -
operation. Read more
impl Writeable for Difficulty
[src]
impl Writeable for Difficulty
[src]impl Copy for Difficulty
[src]
impl Eq for Difficulty
[src]
impl StructuralEq for Difficulty
[src]
impl StructuralPartialEq for Difficulty
[src]
Auto Trait Implementations
impl RefUnwindSafe for Difficulty
impl Send for Difficulty
impl Sync for Difficulty
impl Unpin for Difficulty
impl UnwindSafe for Difficulty
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CloneAny for T where
T: Any + Clone,
impl<T> CloneAny for T where
T: Any + Clone,
pub fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
pub fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send, Global> where
T: Send,
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync, Global> where
T: Sync,
T: Sync,
pub fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + 'static + Sync + Send, Global> where
T: Send + Sync,
&self
) -> Box<dyn CloneAny + 'static + Sync + Send, Global> where
T: Send + Sync,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> UnsafeAny for T where
T: Any,
T: Any,