pub struct ValidationIssue {
pub severity: Severity,
pub category: Category,
pub location: Location,
pub code: String,
pub message: String,
pub suggestion: Option<String>,
pub context: HashMap<String, String>,
}Expand description
A single validation issue
Fields§
§severity: SeveritySeverity level
category: CategoryCategory of issue
location: LocationLocation where issue was found
code: StringError code (e.g., “ST2067-2:2020:8.3/FileNotFound”)
message: StringHuman-readable message
suggestion: Option<String>Suggestion for how to fix
context: HashMap<String, String>Additional context
Implementations§
Source§impl ValidationIssue
impl ValidationIssue
pub fn new( severity: Severity, category: Category, code: impl Into<String>, message: impl Into<String>, ) -> Self
pub fn with_location(self, location: Location) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_context( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Clone for ValidationIssue
impl Clone for ValidationIssue
Source§fn clone(&self) -> ValidationIssue
fn clone(&self) -> ValidationIssue
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 ValidationIssue
impl Debug for ValidationIssue
Source§impl<'de> Deserialize<'de> for ValidationIssue
impl<'de> Deserialize<'de> for ValidationIssue
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
Source§impl Display for ValidationIssue
impl Display for ValidationIssue
Source§impl From<&FileValidationError> for ValidationIssue
impl From<&FileValidationError> for ValidationIssue
Source§fn from(err: &FileValidationError) -> Self
fn from(err: &FileValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ValidationIssue
impl RefUnwindSafe for ValidationIssue
impl Send for ValidationIssue
impl Sync for ValidationIssue
impl Unpin for ValidationIssue
impl UnsafeUnpin for ValidationIssue
impl UnwindSafe for ValidationIssue
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