pub struct Finding {
pub id: Option<String>,
pub primary_path: PathBuf,
pub kind: Option<String>,
pub confidence: Option<f64>,
pub severity: Option<String>,
pub tier: Option<String>,
pub evidence: Option<String>,
pub suggested_action: Option<String>,
}Expand description
One finding in a cargo-impact envelope.
Every field except primary_path is optional. Upstream schema additions
are ignored; removed fields decay to None without breaking the parse.
Fields§
§id: Option<String>Content-hashed id (e.g. f-abcd1234...). Stable across runs for the
same finding — consumers can use it to dedupe or exclude.
primary_path: PathBufRepo-relative path to the primary source file for this finding.
kind: Option<String>Discriminant name (e.g. trait_impl, doc_drift_link). When
upstream serializes kind as an internally-tagged object, we keep
the tag name; when it’s a bare string, we keep the string.
confidence: Option<f64>Confidence in [0.0, 1.0]. None when upstream omits it — treat
that as “unknown”, not as zero.
severity: Option<String>"high" / "medium" / "low" / "unknown".
tier: Option<String>"proven" / "likely" / "possible" / "unknown".
evidence: Option<String>Human-readable justification. Free-form UTF-8.
suggested_action: Option<String>Optional shell command hint (e.g. cargo nextest run -E ...).
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn language_hint(&self) -> &'static str
pub fn language_hint(&self) -> &'static str
Language hint for the fenced block that renders this finding’s primary file.
Kind-aware overrides win over extension-based detection — a
doc_drift_link finding always renders as markdown even when the
file has no extension. For every other kind we fall back to the
shared extension map so .rs → rust, .toml → toml, etc.
Sourcepub fn descriptor(&self) -> String
pub fn descriptor(&self) -> String
Short descriptor for section headers: kind + severity/tier +
confidence, whichever pieces are present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Finding
impl<'de> Deserialize<'de> for Finding
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>,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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