pub struct ValidationResult<'input> {
pub path: &'input str,
pub duplicate_sections: Vec<&'input str>,
pub duplicate_properties: BTreeMap<&'input str, Vec<&'input str>>,
pub ext_problems: Vec<ExtValidationResult<'input>>,
pub similar_properties: BTreeMap<&'input str, Vec<(&'input str, &'input str)>>,
}Expand description
Represents the result of validating a configuration file.
This struct holds various details about the validation process, including paths, duplicate sections, duplicate properties, external problems, and similar properties.
§Fields
path- The path of the configuration file being validated.duplicate_sections- A list of sections that are duplicated within the file.duplicate_properties- A map where the keys are property names and the values are vectors of sections in which the properties are duplicated.ext_problems- A list of extended validation results containing details about duplicates and similar properties found in external files.similar_properties- A map where the keys are property names and the values are vectors of tuples, each containing a pair of similar properties.
§Example
use std::collections::BTreeMap;
use editorconfiger::ValidationResult;
let validation_result = ValidationResult {
path: "path/to/config.file",
duplicate_sections: vec!["section1", "section2"],
duplicate_properties: BTreeMap::new(),
ext_problems: vec![],
similar_properties: BTreeMap::new(),
};Fields§
§path: &'input str§duplicate_sections: Vec<&'input str>§duplicate_properties: BTreeMap<&'input str, Vec<&'input str>>§ext_problems: Vec<ExtValidationResult<'input>>§similar_properties: BTreeMap<&'input str, Vec<(&'input str, &'input str)>>Implementations§
Source§impl ValidationResult<'_>
impl ValidationResult<'_>
pub fn state(&self) -> ValidationState
Auto Trait Implementations§
impl<'input> Freeze for ValidationResult<'input>
impl<'input> RefUnwindSafe for ValidationResult<'input>
impl<'input> Send for ValidationResult<'input>
impl<'input> Sync for ValidationResult<'input>
impl<'input> Unpin for ValidationResult<'input>
impl<'input> UnwindSafe for ValidationResult<'input>
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