pub struct TranslationOutput {
pub toml: String,
pub issues: Vec<CompatIssue>,
}Expand description
Result of translating pproxy-compatible input.
Stores one typed CompatIssue per finding. The legacy warnings /
unsupported collections are views (filters) over those issues, and the
human/JSON renderings derive from the same model, so classifications
cannot drift between outputs.
Fields§
§toml: StringGenerated Eggress TOML configuration.
issues: Vec<CompatIssue>Canonical typed findings; all other views derive from these.
Implementations§
Source§impl TranslationOutput
impl TranslationOutput
pub fn new(toml: String) -> Self
pub fn with_warning( self, category: &'static str, message: impl Into<String>, ) -> Self
pub fn with_unsupported( self, feature: &'static str, detail: impl Into<String>, ) -> Self
pub fn with_warnings(self, warnings: Vec<CompatWarning>) -> Self
pub fn with_unsupported_features( self, features: Vec<UnsupportedFeature>, ) -> Self
Sourcepub fn with_issues(self, issues: Vec<CompatIssue>) -> Self
pub fn with_issues(self, issues: Vec<CompatIssue>) -> Self
Append already-typed issues (e.g. merging a sub-translation).
Sourcepub fn warnings(&self) -> Vec<CompatWarning>
pub fn warnings(&self) -> Vec<CompatWarning>
Legacy warning view: all Warning-severity issues, in order.
Sourcepub fn unsupported(&self) -> Vec<UnsupportedFeature>
pub fn unsupported(&self) -> Vec<UnsupportedFeature>
Legacy unsupported view: all Unsupported-severity issues, in order.
Sourcepub fn diagnostics(&self) -> Vec<StructuredDiagnostic>
pub fn diagnostics(&self) -> Vec<StructuredDiagnostic>
Structured diagnostics view for JSON/human rendering.
Sourcepub fn has_unsupported(&self) -> bool
pub fn has_unsupported(&self) -> bool
Whether any blocking (Unsupported) issue is present.
pub fn warnings_to_string(&self) -> String
Trait Implementations§
Source§impl Clone for TranslationOutput
impl Clone for TranslationOutput
Source§fn clone(&self) -> TranslationOutput
fn clone(&self) -> TranslationOutput
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 TranslationOutput
impl Debug for TranslationOutput
Source§impl Default for TranslationOutput
impl Default for TranslationOutput
Source§fn default() -> TranslationOutput
fn default() -> TranslationOutput
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TranslationOutput
impl RefUnwindSafe for TranslationOutput
impl Send for TranslationOutput
impl Sync for TranslationOutput
impl Unpin for TranslationOutput
impl UnsafeUnpin for TranslationOutput
impl UnwindSafe for TranslationOutput
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