Skip to main content

FindingKind

Enum FindingKind 

Source
pub enum FindingKind {
    TestReference {
        test: Location,
        matched_symbols: Vec<String>,
    },
    TraitImpl {
        trait_name: String,
        impl_for: String,
        impl_site: Location,
    },
    DerivedTraitImpl {
        trait_name: String,
        impl_for: String,
        derive_site: Location,
    },
    DynDispatch {
        trait_name: String,
        site: Location,
    },
    DocDriftLink {
        symbol: String,
        doc: Location,
        line: u32,
    },
    DocDriftKeyword {
        symbol: String,
        doc: Location,
        line: u32,
    },
    FfiSignatureChange {
        symbol: String,
        file: PathBuf,
        change: &'static str,
    },
    BuildScriptChanged {
        file: PathBuf,
    },
    SemverCheck {
        level: String,
        details: String,
    },
    ResolvedReference {
        source_symbol: String,
        target: Location,
    },
    RuntimeSurface {
        framework: String,
        identifier: String,
        site: Location,
    },
    TraitDefinitionChange {
        trait_name: String,
        file: PathBuf,
        method: Option<String>,
        change: TraitChange,
    },
}
Expand description

Reason a specific finding was emitted. Variants carry the analysis-kind payload; cross-cutting fields (tier, confidence, severity) live on Finding.

Variants§

§

TestReference

A test function whose body syntactically references a changed symbol.

Fields

§matched_symbols: Vec<String>
§

TraitImpl

An impl TraitName for T block in the workspace where TraitName was defined in a changed file.

Fields

§trait_name: String
§impl_for: String
§impl_site: Location
§

DerivedTraitImpl

A #[derive(TraitName)] attribute on a struct, enum, or union where TraitName was defined in a changed file. Treated as an implicit impl site — the derive will expand to one at compile time — but distinguished from TraitImpl so consumers can filter.

Fields

§trait_name: String
§impl_for: String
§derive_site: Location
§

DynDispatch

A dyn TraitName type reference for a trait whose definition changed.

Fields

§trait_name: String

An intra-doc link like [Symbol] in a markdown file or /// comment referencing a changed symbol.

Fields

§symbol: String
§line: u32
§

DocDriftKeyword

A plain identifier match inside a doc comment or markdown file — weaker signal than an intra-doc link, emitted at Possible tier only.

Fields

§symbol: String
§line: u32
§

FfiSignatureChange

An extern "C" signature or #[no_mangle] function was added, removed, or modified. Signatures cross the Rust/native boundary — downstream consumers outside Rust cannot be analyzed by us, so these are always surfaced at High severity.

Fields

§symbol: String
§file: PathBuf
§change: &'static str

"added", "removed", or "modified".

§

BuildScriptChanged

A build.rs script file changed. Build scripts can invalidate downstream compilation in non-obvious ways (env vars, rerun-if-*, generated code, linker flags).

Fields

§file: PathBuf
§

SemverCheck

Outcome of a cargo-semver-checks run. level is one of "breaking" (the only currently-emitted value) or a finer-grained classification in a future release. details carries the tool’s own output verbatim so consumers can surface it without a re-invocation.

Fields

§level: String
§details: String
§

ResolvedReference

A name-resolved reference to a changed symbol, emitted by the rust-analyzer LSP integration. These are the only findings that legitimately reach the Proven tier in this release — the syn-only analyzers (TestReference, TraitImpl, DerivedTraitImpl, etc.) top out at Likely because they can’t prove name resolution without a compiler front-end.

Fields

§source_symbol: String
§target: Location
§

RuntimeSurface

A runtime-surface handler (HTTP route, CLI subcommand, etc.) implicated by a changed symbol. Emitted by framework-specific adapters (axum, clap — see src/adapters.rs). framework names the adapter that produced it; identifier is the framework-specific surface identity (route path, subcommand name); site points at the Rust source defining the handler.

Fields

§framework: String
§identifier: String
§

TraitDefinitionChange

A specific, per-method change inside a trait definition. Complements TraitImpl (which flags every impl of a changed trait at blanket precision) by explaining what about the trait changed — required vs default method, added/removed, signature vs body. Severity and confidence derive from change per README §3B.

Fields

§trait_name: String
§file: PathBuf
§method: Option<String>

Specific method name when the change is method-scoped; None for trait-level changes (supertraits, generic bounds).

§change: TraitChange

Machine-readable classification; renderers map this to evidence text and severity.

Implementations§

Source§

impl FindingKind

Source

pub fn default_severity(&self) -> SeverityClass

Default severity for this kind — callers can override but rarely need to.

Source

pub fn primary_path(&self) -> Option<&Path>

The primary file path this finding is about, for ignore-filtering and UI “go to file” affordances. Returns None for global findings that don’t name a specific path (e.g. SemverCheck, which reports on the whole public API surface).

Source

pub fn all_tags() -> &'static [&'static str]

Every possible value Self::tag can return — useful for schema generators (SARIF rules list, MCP tool descriptions) that need to enumerate kinds without having a runtime instance.

Source

pub fn tag(&self) -> &'static str

Tag used for sorting/grouping and the JSON kind field’s value.

Trait Implementations§

Source§

impl Clone for FindingKind

Source§

fn clone(&self) -> FindingKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FindingKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FindingKind

Source§

fn eq(&self, other: &FindingKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for FindingKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for FindingKind

Source§

impl StructuralPartialEq for FindingKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.