pub struct PatternOptions<E> { /* private fields */ }Expand description
Configuration for how regular expressions are handled in schema keywords like pattern and patternProperties.
Implementations§
Source§impl PatternOptions<FancyRegex>
impl PatternOptions<FancyRegex>
Sourcepub fn fancy_regex() -> PatternOptions<FancyRegex>
pub fn fancy_regex() -> PatternOptions<FancyRegex>
Create a pattern configuration based on the fancy-regex engine.
Sourcepub fn backtrack_limit(self, limit: usize) -> Self
pub fn backtrack_limit(self, limit: usize) -> Self
Limit for how many times backtracking should be attempted for fancy regexes (where backtracking is used). If this limit is exceeded, execution returns an error. This is for preventing a regex with catastrophic backtracking to run for too long.
Default is 1_000_000 (1 million).
Sourcepub fn size_limit(self, limit: usize) -> Self
pub fn size_limit(self, limit: usize) -> Self
Set the approximate size limit, in bytes, of the compiled regex.
Sourcepub fn dfa_size_limit(self, limit: usize) -> Self
pub fn dfa_size_limit(self, limit: usize) -> Self
Set the approximate capacity, in bytes, of the cache of transitions used by the lazy DFA.
Source§impl PatternOptions<Regex>
impl PatternOptions<Regex>
Sourcepub fn regex() -> PatternOptions<Regex>
pub fn regex() -> PatternOptions<Regex>
Create a pattern configuration based on the regex engine.
Sourcepub fn size_limit(self, limit: usize) -> Self
pub fn size_limit(self, limit: usize) -> Self
Set the approximate size limit, in bytes, of the compiled regex.
Sourcepub fn dfa_size_limit(self, limit: usize) -> Self
pub fn dfa_size_limit(self, limit: usize) -> Self
Set the approximate capacity, in bytes, of the cache of transitions used by the lazy DFA.
Trait Implementations§
Source§impl<E: Clone> Clone for PatternOptions<E>
impl<E: Clone> Clone for PatternOptions<E>
Source§fn clone(&self) -> PatternOptions<E>
fn clone(&self) -> PatternOptions<E>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more