pub struct ParserConfig {Show 15 fields
pub backend: ParserBackend,
pub timeout: Duration,
pub max_expression_depth: u32,
pub max_collection_size: u32,
pub max_string_length: u32,
pub max_parameters: u32,
pub strict_validation: bool,
pub allow_experimental: bool,
pub backend_options: HashMap<String, Value>,
pub features: Vec<ParserFeature>,
pub memory_limits: MemoryLimits,
pub performance: PerformanceSettings,
pub error_handling: ErrorHandlingSettings,
pub memory_settings: MemorySettings,
pub security_settings: SecuritySettings,
}Expand description
Parser configuration
Fields§
§backend: ParserBackendBackend to use for parsing
timeout: DurationTimeout for parsing operations
max_expression_depth: u32Maximum depth for nested expressions
max_collection_size: u32Maximum number of items in collections
max_string_length: u32Maximum length for string literals
max_parameters: u32Maximum number of parameters in a statement
strict_validation: boolWhether to enable strict validation
allow_experimental: boolWhether to allow experimental features
backend_options: HashMap<String, Value>Backend-specific options
features: Vec<ParserFeature>Features to enable
memory_limits: MemoryLimitsMemory limits
performance: PerformanceSettingsPerformance settings
error_handling: ErrorHandlingSettingsError handling settings
memory_settings: MemorySettingsMemory settings
security_settings: SecuritySettingsSecurity settings
Implementations§
Source§impl ParserConfig
impl ParserConfig
Sourcepub fn fast() -> Self
pub fn fast() -> Self
Create a fast configuration optimized for performance
Parallel parsing requires >=2 worker threads, so the thread count is
set to max(num_cpus, 2) to stay valid even on single-core CI runners.
Sourcepub fn development() -> Self
pub fn development() -> Self
Create a development configuration with debugging features
Sourcepub fn with_backend(self, backend: ParserBackend) -> Self
pub fn with_backend(self, backend: ParserBackend) -> Self
Set the parser backend
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the timeout
Sourcepub fn with_strict_validation(self, strict: bool) -> Self
pub fn with_strict_validation(self, strict: bool) -> Self
Enable strict validation
Sourcepub fn with_feature(self, feature: ParserFeature) -> Self
pub fn with_feature(self, feature: ParserFeature) -> Self
Add a feature (no-op if already present)
Sourcepub fn has_feature(&self, feature: &ParserFeature) -> bool
pub fn has_feature(&self, feature: &ParserFeature) -> bool
Check if a feature is enabled
Trait Implementations§
Source§impl Clone for ParserConfig
impl Clone for ParserConfig
Source§fn clone(&self) -> ParserConfig
fn clone(&self) -> ParserConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParserConfig
impl Debug for ParserConfig
Source§impl Default for ParserConfig
impl Default for ParserConfig
Source§impl<'de> Deserialize<'de> for ParserConfig
impl<'de> Deserialize<'de> for ParserConfig
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>,
Source§impl PartialEq for ParserConfig
impl PartialEq for ParserConfig
Source§fn eq(&self, other: &ParserConfig) -> bool
fn eq(&self, other: &ParserConfig) -> bool
self and other values to be equal, and is used by ==.