#[non_exhaustive]pub struct Conversion {
pub text: String,
pub diagnostics: Vec<Diagnostic>,
}Expand description
Output of a conversion: the serialized text plus the fidelity findings:
data the target can’t represent, defaults synthesized, or blocks mapped
best effort. Empty diagnostics means a faithful conversion. For
convert_file and convert_str, diagnostics carries the read side
findings ahead of the write side. Warning is one diagnostic severity;
rendered text lines come from crate::diagnostics::render_diagnostics.
#[non_exhaustive]: a returns-only type, so downstream code reads it but
never constructs it, leaving room to add fidelity metadata without a breaking
change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: String§diagnostics: Vec<Diagnostic>The findings as structured records: a stable code, a severity, and a message.
Implementations§
Source§impl Conversion
impl Conversion
Sourcepub fn rendered_diagnostics(&self) -> Vec<String>
pub fn rendered_diagnostics(&self) -> Vec<String>
The findings as CODE: message lines, rendered on request. Warning is
one diagnostic severity; there is no separately stored text channel.
Trait Implementations§
Source§impl Clone for Conversion
impl Clone for Conversion
Source§fn clone(&self) -> Conversion
fn clone(&self) -> Conversion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more