pub struct CodeEvidence {
pub file: PathBuf,
pub line: usize,
pub end_line: usize,
pub snippet: String,
pub snippet_start_line: usize,
pub anchor: AnchorKind,
}Expand description
A snippet of code serving as evidence for a finding.
Fields§
§file: PathBufPath to the source file this evidence comes from.
line: usize§end_line: usize§snippet: StringReal source code lines extracted from the file. Empty string when only IR-based detection was run (unchanged files).
snippet_start_line: usizeLine number where the snippet text starts.
May be less than line when leading context lines are included.
Defaults to 0 (meaning: use line as the start).
anchor: AnchorKindHow this row is anchored — see AnchorKind. Defaults to
AnchorKind::CallSite for backward-compat deserialisation.
Trait Implementations§
Source§impl Clone for CodeEvidence
impl Clone for CodeEvidence
Source§fn clone(&self) -> CodeEvidence
fn clone(&self) -> CodeEvidence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CodeEvidence
impl Debug for CodeEvidence
Source§impl<'de> Deserialize<'de> for CodeEvidence
impl<'de> Deserialize<'de> for CodeEvidence
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 CodeEvidence
impl RefUnwindSafe for CodeEvidence
impl Send for CodeEvidence
impl Sync for CodeEvidence
impl Unpin for CodeEvidence
impl UnsafeUnpin for CodeEvidence
impl UnwindSafe for CodeEvidence
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