[][src]Struct mohan::Compact

pub struct Compact(_);

Compact representation of U256

Methods

impl Compact[src]

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

pub fn max_value() -> Self[src]

pub fn to_u256(&self) -> Result<U256, U256>[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: U256) -> Self[src]

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

Trait Implementations

impl From<u32> for Compact[src]

impl From<Compact> for u32[src]

impl From<U256> for Compact[src]

impl From<Compact> for U256[src]

impl Clone for Compact[src]

impl Copy for Compact[src]

impl PartialEq<Compact> for Compact[src]

impl Debug for Compact[src]

impl StructuralPartialEq for Compact[src]

Auto Trait Implementations

impl Send for Compact

impl Sync for Compact

impl Unpin for Compact

impl UnwindSafe for Compact

impl RefUnwindSafe for Compact

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, 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> FromCast<T> for T

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> FromBits<T> for T

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,