pub struct GenerateConfig {
pub patterns: Vec<String>,
pub prefixes: Vec<String>,
pub suffixes: Vec<String>,
pub include_bare: bool,
}Expand description
Configuration for domain name generation.
Controls pattern expansion, prefix/suffix permutation, and the generation pipeline.
Used by the generate module to produce base domain names before TLD expansion.
Fields§
§patterns: Vec<String>Patterns to expand (e.g., “test\d\d”, “app?”) Supports: \w (a-z + hyphen), \d (0-9), ? (alphanumeric + hyphen), literals
prefixes: Vec<String>Prefixes to prepend to base names (e.g., [“get”, “my”, “try”])
suffixes: Vec<String>Suffixes to append to base names (e.g., [“hub”, “ly”, “ify”])
include_bare: boolWhether to include the bare base name when prefixes/suffixes are provided. Default: true. When false, only affixed variants are generated.
Implementations§
Source§impl GenerateConfig
impl GenerateConfig
Sourcepub fn has_generation(&self) -> bool
pub fn has_generation(&self) -> bool
Returns true if this config would actually generate anything.
Sourcepub fn has_affixes(&self) -> bool
pub fn has_affixes(&self) -> bool
Returns true if affixes are configured.
Trait Implementations§
Source§impl Clone for GenerateConfig
impl Clone for GenerateConfig
Source§fn clone(&self) -> GenerateConfig
fn clone(&self) -> GenerateConfig
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 GenerateConfig
impl Debug for GenerateConfig
Source§impl Default for GenerateConfig
impl Default for GenerateConfig
Source§fn default() -> GenerateConfig
fn default() -> GenerateConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GenerateConfig
impl RefUnwindSafe for GenerateConfig
impl Send for GenerateConfig
impl Sync for GenerateConfig
impl Unpin for GenerateConfig
impl UnsafeUnpin for GenerateConfig
impl UnwindSafe for GenerateConfig
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