Skip to main content

NativeFinding

Struct NativeFinding 

Source
#[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

Source

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.

Source

pub fn with_producer_version(self, version: impl Into<String>) -> Self

Attaches the exact native producer version when the adapter can prove it.

Source

pub fn with_field(self, field: DiagnosticField) -> Self

Appends protected structured native context.

Source

pub fn with_label(self, label: NativeFindingLabel) -> Self

Appends a value-free labelled location.

Source

pub fn with_note(self, note: impl Into<String>) -> Self

Appends value-free native context.

Source

pub fn with_help(self, help: impl Into<String>) -> Self

Attaches native remediation distinct from the BoxFerry rule help.

Source

pub fn source_format(&self) -> &str

Returns the source format, such as compose or quadlet.

Source

pub fn producer(&self) -> &str

Returns the native producer, such as compose-lens.

Source

pub fn producer_version(&self) -> Option<&str>

Returns the exact producer version when recorded.

Source

pub fn code(&self) -> &str

Returns the producer-owned stable code.

Source

pub fn stage(&self) -> &str

Returns the native processing stage.

Source

pub const fn severity(&self) -> Severity

Returns the native severity.

Source

pub fn summary(&self) -> &str

Returns the value-free native summary.

Source

pub fn fields(&self) -> &[DiagnosticField]

Returns protected structured native context.

Source

pub fn labels(&self) -> &[NativeFindingLabel]

Returns labelled native locations in producer order.

Source

pub fn notes(&self) -> &[String]

Returns value-free producer notes.

Source

pub fn help(&self) -> Option<&str>

Returns producer remediation when recorded.

Trait Implementations§

Source§

impl Clone for NativeFinding

Source§

fn clone(&self) -> NativeFinding

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 NativeFinding

Source§

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

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

impl Eq for NativeFinding

Source§

impl PartialEq for NativeFinding

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NativeFinding

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> 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.