pub struct DifficultyEstimate {
pub pattern: Pattern,
pub probability: f64,
pub expected_attempts: u64,
pub estimated_time: Duration,
pub difficulty_level: DifficultyLevel,
}Expand description
Difficulty estimate for a vanity pattern.
Fields§
§pattern: PatternThe pattern being estimated.
probability: f64Probability of finding a match per attempt.
expected_attempts: u64Expected number of attempts to find a match.
estimated_time: DurationEstimated time to find a match at given rate.
difficulty_level: DifficultyLevelDifficulty level category.
Implementations§
Source§impl DifficultyEstimate
impl DifficultyEstimate
Sourcepub fn calculate(
pattern: &Pattern,
address_type: AddressType,
case_sensitive: bool,
generation_rate: f64,
) -> Self
pub fn calculate( pattern: &Pattern, address_type: AddressType, case_sensitive: bool, generation_rate: f64, ) -> Self
Calculate difficulty estimate for a pattern.
Sourcepub fn is_practical(&self) -> bool
pub fn is_practical(&self) -> bool
Check if this pattern is practical to search for.
Trait Implementations§
Source§impl Clone for DifficultyEstimate
impl Clone for DifficultyEstimate
Source§fn clone(&self) -> DifficultyEstimate
fn clone(&self) -> DifficultyEstimate
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 DifficultyEstimate
impl Debug for DifficultyEstimate
Auto Trait Implementations§
impl Freeze for DifficultyEstimate
impl RefUnwindSafe for DifficultyEstimate
impl Send for DifficultyEstimate
impl Sync for DifficultyEstimate
impl Unpin for DifficultyEstimate
impl UnwindSafe for DifficultyEstimate
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