pub struct ValidationResult {
pub valid: bool,
pub errors: Vec<String>,
pub warnings: Vec<String>,
pub hints: Vec<String>,
pub diagnostics: Vec<Diagnostic>,
pub yaml_type: Option<YamlType>,
}Expand description
Result of validating a YAML configuration file.
Contains both simple string lists (errors, warnings) for easy display and rich diagnostics for detailed UI rendering.
Fields§
§valid: boolWhether the configuration passed structural validation (no errors).
errors: Vec<String>Error messages (structural issues that make the config invalid).
warnings: Vec<String>Warning messages (valid but risky configurations).
hints: Vec<String>Optimization hints (Info/Hint severity — best-practice suggestions).
diagnostics: Vec<Diagnostic>Rich diagnostics (superset of errors+warnings+hints, includes Info/Hint).
yaml_type: Option<YamlType>The detected YAML type, if recognized.
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn from_diagnostics(yaml_type: YamlType, diags: Vec<Diagnostic>) -> Self
pub fn from_diagnostics(yaml_type: YamlType, diags: Vec<Diagnostic>) -> Self
Convenience: build from a list of Diagnostics.
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
Returns a duplicate of the value. Read more
1.0.0 · 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 ValidationResult
impl Debug for ValidationResult
Source§impl<'de> Deserialize<'de> for ValidationResult
impl<'de> Deserialize<'de> for ValidationResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin for ValidationResult
impl UnsafeUnpin for ValidationResult
impl UnwindSafe for ValidationResult
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