pub struct ParserCommandGenerator {
pub complexity: CommandComplexity,
pub max_depth: usize,
pub max_arguments: usize,
pub separators: Vec<String>,
pub argument_patterns: Vec<ArgumentPattern>,
}Expand description
Parser command generator with syntax-aware patterns
Fields§
§complexity: CommandComplexityCommand complexity level
max_depth: usizeMaximum nesting depth for command hierarchies
max_arguments: usizeMaximum arguments per command
separators: Vec<String>Command separator patterns
argument_patterns: Vec<ArgumentPattern>Argument patterns to use
Implementations§
Source§impl ParserCommandGenerator
impl ParserCommandGenerator
Sourcepub fn complexity(self, complexity: CommandComplexity) -> Self
pub fn complexity(self, complexity: CommandComplexity) -> Self
Set command complexity level
Sourcepub fn max_arguments(self, args: usize) -> Self
pub fn max_arguments(self, args: usize) -> Self
Set maximum arguments per command
Sourcepub fn with_pattern(self, pattern: ArgumentPattern) -> Self
pub fn with_pattern(self, pattern: ArgumentPattern) -> Self
Add argument pattern
Sourcepub fn generate_command(&self, index: usize) -> String
pub fn generate_command(&self, index: usize) -> String
Generate a single command
Sourcepub fn generate_commands(&self, count: usize) -> Vec<String>
pub fn generate_commands(&self, count: usize) -> Vec<String>
Generate multiple commands
Sourcepub fn generate_batch_commands(&self, count: usize) -> String
pub fn generate_batch_commands(&self, count: usize) -> String
Generate batch command string with separators
Sourcepub fn generate_error_cases(&self, count: usize) -> Vec<String>
pub fn generate_error_cases(&self, count: usize) -> Vec<String>
Generate error cases for parser robustness testing
Sourcepub fn generate_workload(&self, total_count: usize) -> ParserWorkload
pub fn generate_workload(&self, total_count: usize) -> ParserWorkload
Generate realistic parser workload with distribution
Trait Implementations§
Source§impl Clone for ParserCommandGenerator
impl Clone for ParserCommandGenerator
Source§impl Debug for ParserCommandGenerator
impl Debug for ParserCommandGenerator
Auto Trait Implementations§
impl Freeze for ParserCommandGenerator
impl RefUnwindSafe for ParserCommandGenerator
impl Send for ParserCommandGenerator
impl Sync for ParserCommandGenerator
impl Unpin for ParserCommandGenerator
impl UnsafeUnpin for ParserCommandGenerator
impl UnwindSafe for ParserCommandGenerator
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