pub struct ProofOfWorkConfig {
pub difficulty: u32,
pub max_nonce: u64,
pub threads: usize,
}
Expand description
Proof of Work parameters and configuration
Fields§
§difficulty: u32
Difficulty target (number of leading zeros required)
max_nonce: u64
Maximum nonce to try before giving up
threads: usize
Number of worker threads to use for mining
Trait Implementations§
Source§impl Clone for ProofOfWorkConfig
impl Clone for ProofOfWorkConfig
Source§fn clone(&self) -> ProofOfWorkConfig
fn clone(&self) -> ProofOfWorkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProofOfWorkConfig
impl Debug for ProofOfWorkConfig
Source§impl Default for ProofOfWorkConfig
impl Default for ProofOfWorkConfig
Source§impl<'de> Deserialize<'de> for ProofOfWorkConfig
impl<'de> Deserialize<'de> for ProofOfWorkConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProofOfWorkConfig
impl RefUnwindSafe for ProofOfWorkConfig
impl Send for ProofOfWorkConfig
impl Sync for ProofOfWorkConfig
impl Unpin for ProofOfWorkConfig
impl UnwindSafe for ProofOfWorkConfig
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