pub struct Finding {
pub rule_id: String,
pub span: (usize, usize),
pub snippet: String,
pub snippet_truncated: bool,
pub container: Container,
pub topic_term: bool,
}Expand description
One detected pattern occurrence, cited by byte span into the input text.
Fields§
§rule_id: StringStable rule identifier from the pattern data.
span: (usize, usize)Byte span (start, end) of the full match in the input text. The
span always covers the whole occurrence, even when the snippet is
capped.
snippet: StringThe matched text, verbatim from the input. Equal to the source slice
at span when that slice is at most 200 bytes. Otherwise the first
200 bytes of it (cut on a character boundary) with
snippet_truncated set.
snippet_truncated: boolTrue when the snippet is a capped prefix of the source slice at
span.
container: ContainerContainer classification of the span’s start position. Annotation only: a fenced or quoted finding still reports.
topic_term: boolTrue when the matched text equals one of the caller-supplied
topic-vocabulary terms (--allow-term, case-insensitive whole-term
equality). Labeling only: the flag cannot fire or silence anything.
Trait Implementations§
impl Eq for Finding
impl StructuralPartialEq for Finding
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.