pub enum Validation<T> {
Valid(T),
Invalid {
report: T,
message: String,
},
}Expand description
A completed validation with either a valid or invalid structured report.
Variants§
Valid(T)
The input satisfies the validator contract.
Invalid
Validation completed and found invalid input.
Trait Implementations§
Source§impl<T: Clone> Clone for Validation<T>
impl<T: Clone> Clone for Validation<T>
Source§fn clone(&self) -> Validation<T>
fn clone(&self) -> Validation<T>
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<T: Debug> Debug for Validation<T>
impl<T: Debug> Debug for Validation<T>
impl<T: Eq> Eq for Validation<T>
Source§impl<T: PartialEq> PartialEq for Validation<T>
impl<T: PartialEq> PartialEq for Validation<T>
impl<T: PartialEq> StructuralPartialEq for Validation<T>
Auto Trait Implementations§
impl<T> Freeze for Validation<T>where
T: Freeze,
impl<T> RefUnwindSafe for Validation<T>where
T: RefUnwindSafe,
impl<T> Send for Validation<T>where
T: Send,
impl<T> Sync for Validation<T>where
T: Sync,
impl<T> Unpin for Validation<T>where
T: Unpin,
impl<T> UnsafeUnpin for Validation<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Validation<T>where
T: UnwindSafe,
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