pub struct ValidationResult {
pub valid: bool,
pub errors: Vec<ValidationError>,
}Expand description
Result of validating SQL
Fields§
§valid: boolWhether the SQL is valid (no errors, warnings are allowed)
errors: Vec<ValidationError>List of validation errors and warnings
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn with_errors(errors: Vec<ValidationError>) -> Self
pub fn with_errors(errors: Vec<ValidationError>) -> Self
Create a validation result with errors
Sourcepub fn add_error(&mut self, error: ValidationError)
pub fn add_error(&mut self, error: ValidationError)
Add an error to the result
Trait Implementations§
Source§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 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