#[non_exhaustive]pub struct Validation {
    pub description: String,
    pub state: State,
    pub message: Vec<ValidationMessage>,
    pub code: String,
    /* private fields */
}Expand description
A validation to perform on a stream.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.description: StringA short description of the validation.
state: StateOutput only. Validation execution status.
message: Vec<ValidationMessage>Messages reflecting the validation results.
code: StringA custom code identifying this validation.
Implementations§
Source§impl Validation
 
impl Validation
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
 
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_message<T, V>(self, v: T) -> Self
 
pub fn set_message<T, V>(self, v: T) -> Self
Sets the value of message.
Trait Implementations§
Source§impl Clone for Validation
 
impl Clone for Validation
Source§fn clone(&self) -> Validation
 
fn clone(&self) -> Validation
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 Validation
 
impl Debug for Validation
Source§impl Default for Validation
 
impl Default for Validation
Source§fn default() -> Validation
 
fn default() -> Validation
Returns the “default value” for a type. Read more
Source§impl PartialEq for Validation
 
impl PartialEq for Validation
impl StructuralPartialEq for Validation
Auto Trait Implementations§
impl Freeze for Validation
impl RefUnwindSafe for Validation
impl Send for Validation
impl Sync for Validation
impl Unpin for Validation
impl UnwindSafe for Validation
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