pub struct UnusedExportFinding {
pub export: UnusedExport,
pub actions: Vec<IssueAction>,
pub semantic: Option<SemanticCandidateDecision>,
pub introduced: Option<AuditIntroduced>,
pub effective_severity: Option<EffectiveSeverity>,
pub reachability_caveats: Vec<ReachabilityCaveat>,
}Expand description
Wire-shape envelope for an UnusedExport finding consumed under the
unused_exports key. Same Rust struct as UnusedTypeFinding, with a
different fix description so consumers can tell value-export from
type-export removal at the action level.
Fields§
§export: UnusedExportThe underlying dead-code entry.
actions: Vec<IssueAction>Suggested next steps. Always emitted (possibly empty for forward-compat).
semantic: Option<SemanticCandidateDecision>Type-aware evidence for this exact candidate when requested.
introduced: Option<AuditIntroduced>Set by the audit pass when this finding is introduced relative to the merge-base.
effective_severity: Option<EffectiveSeverity>Gate severity of this finding after rules and overrides[].rules
resolve for its path. CI formats read it for the annotation, SARIF
and CodeClimate level. Absent in output from older versions. Not
part of the finding identity, baseline keys or fingerprints.
reachability_caveats: Vec<ReachabilityCaveat>Advisory caveats on the reachability verdict behind this finding.
Sorted, deduplicated, and omitted from the wire when empty. Never gates
the finding or the remove-export action, though fallow fix does
withhold the removal of a caveated export as low confidence.
Implementations§
Source§impl UnusedExportFinding
impl UnusedExportFinding
Sourcepub fn with_actions(export: UnusedExport) -> UnusedExportFinding
pub fn with_actions(export: UnusedExport) -> UnusedExportFinding
Build the wrapper. When export.is_re_export is true, the fix
action’s note warns about possible public-API surface; otherwise
note is absent on the fix action.
Sourcepub fn set_semantic_decision(&mut self, decision: SemanticCandidateDecision)
pub fn set_semantic_decision(&mut self, decision: SemanticCandidateDecision)
Attach type-aware evidence and disable the syntactic fix when semantic analysis could not establish complete negative evidence.
Trait Implementations§
Source§impl CaveatedFinding for UnusedExportFinding
impl CaveatedFinding for UnusedExportFinding
Source§fn set_reachability_caveats(&mut self, caveats: Vec<ReachabilityCaveat>)
fn set_reachability_caveats(&mut self, caveats: Vec<ReachabilityCaveat>)
caveats and downgrade every mutating action the gate now
withholds. The field itself stays pub (a renderer test builds an
already-caveated fixture directly, without running the annotation
pass); every non-test writer goes through this setter instead of the
field so the downgrade travels with the write.Source§impl Clone for UnusedExportFinding
impl Clone for UnusedExportFinding
Source§fn clone(&self) -> UnusedExportFinding
fn clone(&self) -> UnusedExportFinding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UnusedExportFinding
impl Debug for UnusedExportFinding
Source§impl<'de> Deserialize<'de> for UnusedExportFinding
impl<'de> Deserialize<'de> for UnusedExportFinding
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnusedExportFinding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnusedExportFinding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl GatedFinding for UnusedExportFinding
impl GatedFinding for UnusedExportFinding
Source§fn effective_severity(&self) -> Option<EffectiveSeverity>
fn effective_severity(&self) -> Option<EffectiveSeverity>
None when no value was written.Source§fn set_effective_severity(&mut self, severity: Option<EffectiveSeverity>)
fn set_effective_severity(&mut self, severity: Option<EffectiveSeverity>)
Source§impl JsonSchema for UnusedExportFinding
impl JsonSchema for UnusedExportFinding
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MutationEvidence for UnusedExportFinding
impl MutationEvidence for UnusedExportFinding
Source§fn reachability_caveats(&self) -> &[ReachabilityCaveat]
fn reachability_caveats(&self) -> &[ReachabilityCaveat]
Source§fn may_auto_apply_mutation(&self) -> bool
fn may_auto_apply_mutation(&self) -> bool
Source§impl RuleSeverity for UnusedExportFinding
impl RuleSeverity for UnusedExportFinding
Source§fn rule_severity(&self, source: &SeveritySource<'_>) -> Severity
fn rule_severity(&self, source: &SeveritySource<'_>) -> Severity
source.Source§fn uniform_severity(source: &SeveritySource<'_>) -> Option<Severity>
fn uniform_severity(source: &SeveritySource<'_>) -> Option<Severity>
source, or
None when the severity can differ from finding to finding. Read moreSource§impl Serialize for UnusedExportFinding
impl Serialize for UnusedExportFinding
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for UnusedExportFinding
impl RefUnwindSafe for UnusedExportFinding
impl Send for UnusedExportFinding
impl Sync for UnusedExportFinding
impl Unpin for UnusedExportFinding
impl UnsafeUnpin for UnusedExportFinding
impl UnwindSafe for UnusedExportFinding
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> 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> ⓘ
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