pub struct ValidationIssue {
pub level: ValidationLevel,
pub code: ValidationCode,
pub message: String,
pub affected_symbol: Option<String>,
}Expand description
A validation issue found during pre-execution validation
Fields§
§level: ValidationLevelSeverity level
code: ValidationCodeIssue code for categorization
message: StringHuman-readable message
affected_symbol: Option<String>Affected symbol name (if applicable)
Implementations§
Source§impl ValidationIssue
impl ValidationIssue
Sourcepub fn new(code: ValidationCode, message: impl Into<String>) -> Self
pub fn new(code: ValidationCode, message: impl Into<String>) -> Self
Create a new validation issue
Sourcepub fn with_level(self, level: ValidationLevel) -> Self
pub fn with_level(self, level: ValidationLevel) -> Self
Create with a custom level (override default)
Sourcepub fn with_symbol(self, symbol: impl Into<String>) -> Self
pub fn with_symbol(self, symbol: impl Into<String>) -> Self
Add affected symbol information
pub fn target_not_found(symbol: &str) -> Self
pub fn duplicate_symbol(symbol: &str) -> Self
pub fn symbol_referenced(symbol: &str, ref_count: usize) -> Self
pub fn no_op(reason: &str) -> Self
Sourcepub fn format_user_friendly(&self) -> String
pub fn format_user_friendly(&self) -> String
Format this issue as a user-friendly message with suggestions
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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more