[−][src]Struct mohan::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]
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, 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> FromCast<T> for T
fn from_cast(t: T) -> T
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<T> FromBits<T> for T
fn from_bits(t: T) -> T
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
fn into_bits(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,