#[non_exhaustive]pub struct NativeFinding { /* private fields */ }Expand description
A native parser, model, runtime, or platform finding retained at an adapter boundary.
This envelope is intentionally independent of Compose, Quadlet, Docker, Podman, and
Kubernetes types. Native libraries keep ownership of their codes; BoxFerry retains those codes
as provenance while applying its own rule and loss policy in Diagnostic.
Implementations§
Source§impl NativeFinding
impl NativeFinding
Sourcepub fn new(
source_format: impl Into<String>,
producer: impl Into<String>,
code: impl Into<String>,
stage: impl Into<String>,
severity: Severity,
summary: impl Into<String>,
) -> Self
pub fn new( source_format: impl Into<String>, producer: impl Into<String>, code: impl Into<String>, stage: impl Into<String>, severity: Severity, summary: impl Into<String>, ) -> Self
Creates a value-free native finding.
Sourcepub fn with_producer_version(self, version: impl Into<String>) -> Self
pub fn with_producer_version(self, version: impl Into<String>) -> Self
Attaches the exact native producer version when the adapter can prove it.
Sourcepub fn with_field(self, field: DiagnosticField) -> Self
pub fn with_field(self, field: DiagnosticField) -> Self
Appends protected structured native context.
Sourcepub fn with_label(self, label: NativeFindingLabel) -> Self
pub fn with_label(self, label: NativeFindingLabel) -> Self
Appends a value-free labelled location.
Sourcepub fn with_help(self, help: impl Into<String>) -> Self
pub fn with_help(self, help: impl Into<String>) -> Self
Attaches native remediation distinct from the BoxFerry rule help.
Sourcepub fn source_format(&self) -> &str
pub fn source_format(&self) -> &str
Returns the source format, such as compose or quadlet.
Sourcepub fn producer_version(&self) -> Option<&str>
pub fn producer_version(&self) -> Option<&str>
Returns the exact producer version when recorded.
Sourcepub fn fields(&self) -> &[DiagnosticField]
pub fn fields(&self) -> &[DiagnosticField]
Returns protected structured native context.
Sourcepub fn labels(&self) -> &[NativeFindingLabel]
pub fn labels(&self) -> &[NativeFindingLabel]
Returns labelled native locations in producer order.
Trait Implementations§
Source§impl Clone for NativeFinding
impl Clone for NativeFinding
Source§fn clone(&self) -> NativeFinding
fn clone(&self) -> NativeFinding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more