pub struct Compact(/* private fields */);Implementations§
Source§impl Compact
impl Compact
pub fn new(u: u32) -> Self
pub fn max_value() -> Self
Sourcepub fn to_u256(&self) -> Result<Uint256, Uint256>
pub fn to_u256(&self) -> Result<Uint256, Uint256>
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
pub fn to_f64(&self) -> f64
Trait Implementations§
impl Copy for Compact
impl StructuralPartialEq for Compact
Auto Trait Implementations§
impl Freeze for Compact
impl RefUnwindSafe for Compact
impl Send for Compact
impl Sync for Compact
impl Unpin for Compact
impl UnwindSafe for Compact
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more