pub struct KeccakPoW { /* private fields */ }Trait Implementations§
Source§impl PowStrategy for KeccakPoW
impl PowStrategy for KeccakPoW
Source§fn new(challenge: [u8; 32], bits: f64) -> Self
fn new(challenge: [u8; 32], bits: f64) -> Self
Creates a new proof-of-work challenge.
The
challenge is a 32-byte array that represents the challenge.
The bits is the binary logarithm of the expected amount of work.
When bits is large (i.e. close to 64), a valid solution may not be found.Source§fn solution(&self, nonce: u64) -> PoWSolution
fn solution(&self, nonce: u64) -> PoWSolution
Builds a solution given the input nonce
fn solve(&mut self) -> Option<PoWSolution>
impl Copy for KeccakPoW
Auto Trait Implementations§
impl Freeze for KeccakPoW
impl RefUnwindSafe for KeccakPoW
impl Send for KeccakPoW
impl Sync for KeccakPoW
impl Unpin for KeccakPoW
impl UnwindSafe for KeccakPoW
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more