pub struct Challenge {
pub hash_algorithm: HashAlgorithm,
pub puzzle: String,
pub difficulty: usize,
}Expand description
Represents a PoW challenge (the “puzzle”). This is sent to the client.
Fields§
§hash_algorithm: HashAlgorithm§puzzle: StringThe random string that needs to be hashed.
difficulty: usizeThe number of leading zeros required in the hash.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Challenge
impl RefUnwindSafe for Challenge
impl Send for Challenge
impl Sync for Challenge
impl Unpin for Challenge
impl UnsafeUnpin for Challenge
impl UnwindSafe for Challenge
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