pub struct TargetEvidence {
pub relation: TargetRelation,
pub rule_id: String,
pub file_path: Option<String>,
pub line: Option<usize>,
pub column: Option<usize>,
pub span_bytes: Option<usize>,
pub line_distance: Option<usize>,
pub provenance: ConfidenceProvenance,
}Expand description
Why one target is attributed to one credential.
Deliberately structural. There is no excerpt field, and adding one would break the module’s redaction guarantee: a line holding a credential also holds the credential.
Fields§
§relation: TargetRelationHow the target was tied to the credential.
rule_id: StringTier-B rule id, or metadata:<key> for a decoded target.
file_path: Option<String>File the evidence was observed in. Absent for a decoded target.
line: Option<usize>One-based line of the evidence span. Absent for a decoded target.
column: Option<usize>One-based byte column of the evidence span start.
span_bytes: Option<usize>Length of the evidence span in bytes. The span itself is not emitted.
line_distance: Option<usize>Absolute line distance between the finding and the evidence.
provenance: ConfidenceProvenanceWhere the confidence number came from, so a reader can audit the score without reverse-engineering it.
Trait Implementations§
Source§impl Clone for TargetEvidence
impl Clone for TargetEvidence
Source§fn clone(&self) -> TargetEvidence
fn clone(&self) -> TargetEvidence
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 TargetEvidence
impl Debug for TargetEvidence
Source§impl<'de> Deserialize<'de> for TargetEvidence
impl<'de> Deserialize<'de> for TargetEvidence
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
Source§impl PartialEq for TargetEvidence
impl PartialEq for TargetEvidence
Source§impl Serialize for TargetEvidence
impl Serialize for TargetEvidence
impl StructuralPartialEq for TargetEvidence
Auto Trait Implementations§
impl Freeze for TargetEvidence
impl RefUnwindSafe for TargetEvidence
impl Send for TargetEvidence
impl Sync for TargetEvidence
impl Unpin for TargetEvidence
impl UnsafeUnpin for TargetEvidence
impl UnwindSafe for TargetEvidence
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more