Struct lucky_commit_lib::HashSearchWorker [−][src]
A worker that, when invoked, will look in a predetermined search space to find a modification to a specific commit that matches a specific hash prefix.
Implementations
impl HashSearchWorker[src]
pub fn new(current_commit: &[u8], desired_prefix: HashPrefix) -> Self[src]
Creates a worker for a specific commit and prefix, with an initial workload of 1 ** 48 units. As a rough approximation depending on hardware, each worker can perform about 7 million units of work per second.
pub fn with_capped_search_space(self, workload: u64) -> Self[src]
Caps a worker's search space to approximately the given size.
pub fn search(self) -> Option<HashMatch>[src]
Invokes the worker. The worker will return early with a hash match if it finds one,
otherwise it will search its entire search space and return None.
Trait Implementations
impl Debug for HashSearchWorker[src]
impl PartialEq<HashSearchWorker> for HashSearchWorker[src]
fn eq(&self, other: &HashSearchWorker) -> bool[src]
fn ne(&self, other: &HashSearchWorker) -> bool[src]
impl StructuralPartialEq for HashSearchWorker[src]
Auto Trait Implementations
impl RefUnwindSafe for HashSearchWorker[src]
impl Send for HashSearchWorker[src]
impl Sync for HashSearchWorker[src]
impl Unpin for HashSearchWorker[src]
impl UnwindSafe for HashSearchWorker[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,