pub struct TypoConfig {
pub char_error_rate: f64,
pub type_weights: HashMap<TypoType, f64>,
pub preserve_word_boundaries: bool,
pub max_typos_per_word: usize,
pub protected_fields: Vec<String>,
}Expand description
Configuration for typo generation.
Fields§
§char_error_rate: f64Overall typo rate (per character).
type_weights: HashMap<TypoType, f64>Weights for each typo type.
preserve_word_boundaries: boolWhether to preserve word boundaries.
max_typos_per_word: usizeMaximum typos per word.
protected_fields: Vec<String>Fields that should not have typos (identifiers, codes).
Trait Implementations§
Source§impl Clone for TypoConfig
impl Clone for TypoConfig
Source§fn clone(&self) -> TypoConfig
fn clone(&self) -> TypoConfig
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 TypoConfig
impl Debug for TypoConfig
Auto Trait Implementations§
impl Freeze for TypoConfig
impl RefUnwindSafe for TypoConfig
impl Send for TypoConfig
impl Sync for TypoConfig
impl Unpin for TypoConfig
impl UnwindSafe for TypoConfig
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