pub struct TextMatchSpec {
pub pattern: Option<String>,
pub regex: Option<String>,
pub normalize: Option<bool>,
pub ignore_case: Option<bool>,
pub min: Option<f64>,
pub max: Option<f64>,
pub id: Option<String>,
pub note: Option<String>,
pub level: Option<FindingLevel>,
}Expand description
One match spec — the closed text-match vocabulary. Exactly
one of pattern (a literal substring) or regex (a regex source) supplies the
needle; normalize / ignore_case tune matching; min / max bound the count;
id pins identity; note / level shape the finding.
Fields§
§pattern: Option<String>a literal substring to find
regex: Option<String>a regular expression to find
normalize: Option<bool>collapse whitespace runs before matching, so prose line-wrapping is tolerated (default true)
ignore_case: Option<bool>match without regard to case (default false)
min: Option<f64>the fewest hits allowed
max: Option<f64>the most hits allowed
id: Option<String>an explicit, author-supplied finding id — pins identity across pattern edits
note: Option<String>author rationale, appended to the finding message
level: Option<FindingLevel>finding severity — overrides the registry default (error | warn)
Trait Implementations§
Source§impl Clone for TextMatchSpec
impl Clone for TextMatchSpec
Source§impl Debug for TextMatchSpec
impl Debug for TextMatchSpec
Auto Trait Implementations§
impl Freeze for TextMatchSpec
impl RefUnwindSafe for TextMatchSpec
impl Send for TextMatchSpec
impl Sync for TextMatchSpec
impl Unpin for TextMatchSpec
impl UnsafeUnpin for TextMatchSpec
impl UnwindSafe for TextMatchSpec
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