pub struct WorkUnit {
pub id: u64,
pub pattern: String,
pub address_type: String,
pub case_insensitive: bool,
pub key_count: usize,
pub testnet: bool,
}Expand description
A work unit for distributed search.
Fields§
§id: u64Unique identifier for this work unit
pattern: StringPattern to search for
address_type: StringAddress type to generate
case_insensitive: boolWhether pattern matching is case-insensitive
key_count: usizeNumber of keys to check in this unit
testnet: boolWhether to use testnet
Implementations§
Source§impl WorkUnit
impl WorkUnit
Sourcepub fn new(
id: u64,
pattern: &str,
address_type: AddressType,
case_insensitive: bool,
key_count: usize,
testnet: bool,
) -> Self
pub fn new( id: u64, pattern: &str, address_type: AddressType, case_insensitive: bool, key_count: usize, testnet: bool, ) -> Self
Create a new work unit.
Sourcepub fn get_address_type(&self) -> Result<AddressType, VanityError>
pub fn get_address_type(&self) -> Result<AddressType, VanityError>
Parse address type from string.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WorkUnit
impl<'de> Deserialize<'de> for WorkUnit
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 WorkUnit
impl RefUnwindSafe for WorkUnit
impl Send for WorkUnit
impl Sync for WorkUnit
impl Unpin for WorkUnit
impl UnwindSafe for WorkUnit
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