pub struct FidelityReport { /* private fields */ }Expand description
A human-readable, counted report of what happened during emission.
Counts are keyed by a short field label so repeated decisions across many components collapse into one line (e.g. “synthesized bom-ref from canonical id (x42)”).
Implementations§
Source§impl FidelityReport
impl FidelityReport
Sourcepub fn new(
source_format: impl Into<String>,
target_format: impl Into<String>,
) -> Self
pub fn new( source_format: impl Into<String>, target_format: impl Into<String>, ) -> Self
Create a report for a source → target conversion.
Sourcepub fn synthesized(&mut self, label: impl Into<String>)
pub fn synthesized(&mut self, label: impl Into<String>)
Record that label was synthesized from the typed model.
Sourcepub fn preserved(&mut self, label: impl Into<String>)
pub fn preserved(&mut self, label: impl Into<String>)
Record that label was spliced back from preserved source JSON.
Sourcepub fn dropped(&mut self, label: impl Into<String>)
pub fn dropped(&mut self, label: impl Into<String>)
Record that label was dropped (no representation in the target format).
Sourcepub fn dropped_count(&self) -> usize
pub fn dropped_count(&self) -> usize
Total number of distinct dropped-field labels.
Trait Implementations§
Source§impl Clone for FidelityReport
impl Clone for FidelityReport
Source§fn clone(&self) -> FidelityReport
fn clone(&self) -> FidelityReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FidelityReport
impl Debug for FidelityReport
Source§impl Default for FidelityReport
impl Default for FidelityReport
Source§fn default() -> FidelityReport
fn default() -> FidelityReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FidelityReport
impl RefUnwindSafe for FidelityReport
impl Send for FidelityReport
impl Sync for FidelityReport
impl Unpin for FidelityReport
impl UnsafeUnpin for FidelityReport
impl UnwindSafe for FidelityReport
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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