pub struct ValidationConfig {
pub level: ValidationLevel,
pub providers: Vec<String>,
pub custom_options: HashMap<String, Vec<CustomOption>>,
pub suggestion_threshold: i64,
}
Expand description
Configuration for validation behavior
Fields§
§level: ValidationLevel
Validation level
providers: Vec<String>
Enabled providers
custom_options: HashMap<String, Vec<CustomOption>>
Custom options for specific commands
suggestion_threshold: i64
Minimum similarity score for suggestions
Implementations§
Source§impl ValidationConfig
impl ValidationConfig
Sourcepub fn with_level(level: ValidationLevel) -> Self
pub fn with_level(level: ValidationLevel) -> Self
Create a new config with specified level
Sourcepub fn add_provider(self, provider: impl Into<String>) -> Self
pub fn add_provider(self, provider: impl Into<String>) -> Self
Add a provider to the config
Sourcepub fn with_suggestion_threshold(self, threshold: i64) -> Self
pub fn with_suggestion_threshold(self, threshold: i64) -> Self
Set suggestion threshold
Sourcepub fn is_provider_enabled(&self, provider: &str) -> bool
pub fn is_provider_enabled(&self, provider: &str) -> bool
Check if a provider is enabled
Trait Implementations§
Source§impl Clone for ValidationConfig
impl Clone for ValidationConfig
Source§fn clone(&self) -> ValidationConfig
fn clone(&self) -> ValidationConfig
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 ValidationConfig
impl Debug for ValidationConfig
Source§impl Default for ValidationConfig
impl Default for ValidationConfig
Source§impl<'de> Deserialize<'de> for ValidationConfig
impl<'de> Deserialize<'de> for ValidationConfig
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 ValidationConfig
impl RefUnwindSafe for ValidationConfig
impl Send for ValidationConfig
impl Sync for ValidationConfig
impl Unpin for ValidationConfig
impl UnwindSafe for ValidationConfig
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