pub struct VanityConfig {
pub patterns: Vec<Pattern>,
pub address_type: AddressType,
pub testnet: bool,
pub case_sensitive: bool,
pub max_attempts: Option<u64>,
pub timeout: Option<Duration>,
pub thread_count: Option<usize>,
pub batch_size: usize,
pub progress_interval: Duration,
}Expand description
Configuration for vanity address generation.
Fields§
§patterns: Vec<Pattern>Patterns to search for.
address_type: AddressTypeAddress type to generate.
testnet: boolWhether to use testnet.
case_sensitive: boolWhether matching is case-sensitive.
max_attempts: Option<u64>Maximum number of attempts before giving up.
timeout: Option<Duration>Maximum time to search.
thread_count: Option<usize>Number of threads for parallel search.
batch_size: usizeBatch size for key generation.
progress_interval: DurationInterval for progress callbacks.
Implementations§
Source§impl VanityConfig
impl VanityConfig
Sourcepub fn with_patterns(self, patterns: Vec<Pattern>) -> Self
pub fn with_patterns(self, patterns: Vec<Pattern>) -> Self
Set the patterns to search for.
Sourcepub fn with_pattern(self, pattern: Pattern) -> Self
pub fn with_pattern(self, pattern: Pattern) -> Self
Add a pattern to search for.
Sourcepub fn with_address_type(self, address_type: AddressType) -> Self
pub fn with_address_type(self, address_type: AddressType) -> Self
Set the address type.
Sourcepub fn with_testnet(self, testnet: bool) -> Self
pub fn with_testnet(self, testnet: bool) -> Self
Set whether to use testnet.
Sourcepub fn with_case_sensitive(self, case_sensitive: bool) -> Self
pub fn with_case_sensitive(self, case_sensitive: bool) -> Self
Set case sensitivity.
Sourcepub fn with_max_attempts(self, max: u64) -> Self
pub fn with_max_attempts(self, max: u64) -> Self
Set maximum attempts.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout.
Sourcepub fn with_thread_count(self, count: usize) -> Self
pub fn with_thread_count(self, count: usize) -> Self
Set thread count.
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set batch size.
Sourcepub fn validate(&self) -> Result<(), VanityError>
pub fn validate(&self) -> Result<(), VanityError>
Validate the configuration.
Trait Implementations§
Source§impl Clone for VanityConfig
impl Clone for VanityConfig
Source§fn clone(&self) -> VanityConfig
fn clone(&self) -> VanityConfig
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 VanityConfig
impl Debug for VanityConfig
Auto Trait Implementations§
impl Freeze for VanityConfig
impl RefUnwindSafe for VanityConfig
impl Send for VanityConfig
impl Sync for VanityConfig
impl Unpin for VanityConfig
impl UnwindSafe for VanityConfig
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