pub struct NativeParallelPowGenerator { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Default for NativeParallelPowGenerator
Available on non-WebAssembly only.
impl Default for NativeParallelPowGenerator
Available on non-WebAssembly only.
Source§impl ParallelPowGenerator for NativeParallelPowGenerator
impl ParallelPowGenerator for NativeParallelPowGenerator
Source§fn generate_best_effort<'life0, 'life1, 'async_trait>(
&'life0 self,
_label: &'life1 str,
iteration_limit: usize,
pow_min: Pow,
data_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<(Salt, Pow, Hash)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_best_effort<'life0, 'life1, 'async_trait>(
&'life0 self,
_label: &'life1 str,
iteration_limit: usize,
pow_min: Pow,
data_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<(Salt, Pow, Hash)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run up to
iteration_limit hash attempts and return the best (Salt, Pow, Hash) found.
Exits early if pow >= pow_min is achieved. Read moreSource§fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
label: &'life1 str,
pow_min: Pow,
data_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<(Salt, Pow, Hash)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
label: &'life1 str,
pow_min: Pow,
data_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<(Salt, Pow, Hash)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loop
generate_best_effort in batches until pow >= pow_min is achieved.Source§fn active_jobs(&self) -> Vec<PowJobStatus>
fn active_jobs(&self) -> Vec<PowJobStatus>
Snapshot of all concurrently in-flight
generate calls.Auto Trait Implementations§
impl Freeze for NativeParallelPowGenerator
impl RefUnwindSafe for NativeParallelPowGenerator
impl Send for NativeParallelPowGenerator
impl Sync for NativeParallelPowGenerator
impl Unpin for NativeParallelPowGenerator
impl UnsafeUnpin for NativeParallelPowGenerator
impl UnwindSafe for NativeParallelPowGenerator
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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