Struct ValidationResult

Source
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§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.