pub struct ValidationResult {
pub ok: bool,
pub errors: Option<Vec<WasmViolation>>,
pub error: Option<SystemError>,
}Expand description
Result of a validation operation.
This is the ONLY type returned to JavaScript. No nulls, no exceptions.
Fields§
§ok: boolWhether validation passed
errors: Option<Vec<WasmViolation>>Validation violations (present when ok=false and validation failed)
error: Option<SystemError>System error (present when ok=false and a system error occurred)
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn validation_failed(violations: Vec<WasmViolation>) -> Self
pub fn validation_failed(violations: Vec<WasmViolation>) -> Self
Create a validation failure result
Sourcepub fn system_error(code: &'static str, message: String) -> Self
pub fn system_error(code: &'static str, message: String) -> Self
Create a system error result
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
Returns a duplicate of the value. Read more
1.0.0 · 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 ValidationResult
impl Debug for ValidationResult
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