[−][src]Struct handshake_types::compact::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]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,