[][src]Struct handshake_types::compact::Compact

pub struct Compact(_);

Methods

impl Compact[src]

pub fn new(u: u32) -> Self[src]

pub fn max_value() -> Self[src]

pub fn to_u256(&self) -> Result<Uint256, Uint256>[src]

Computes the target [0, T] that a blockhash must land in to be valid Returns value in error, if there is an overflow or its negative value

pub fn from_u256(val: Uint256) -> Self[src]

pub fn to_f64(&self) -> f64[src]

Trait Implementations

impl Clone for Compact[src]

impl Copy for Compact[src]

impl Debug for Compact[src]

impl From<Compact> for u32[src]

impl From<Compact> for Uint256[src]

impl From<Uint256> for Compact[src]

impl From<u32> for Compact[src]

impl PartialEq<Compact> for Compact[src]

impl StructuralPartialEq for Compact[src]

Auto Trait Implementations

impl RefUnwindSafe for Compact

impl Send for Compact

impl Sync for Compact

impl Unpin for Compact

impl UnwindSafe for Compact

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.