Skip to main content

Validate

Trait Validate 

Source
pub trait Validate {
    // Required method
    fn validate(&self) -> Result<()>;
}
Expand description

The core Validatron trait, types that implement this trait can be exhaustively validated.

Implementors should recursively validate internal structures.

Required Methods§

Source

fn validate(&self) -> Result<()>

Validate the implemented type exhaustively, returning all errors.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<K, V> Validate for BTreeMap<K, V>
where K: Display, V: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<K, V, S> Validate for HashMap<K, V, S>
where K: Display, V: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T> Validate for Option<T>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T> Validate for BinaryHeap<T>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T> Validate for BTreeSet<T>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T> Validate for LinkedList<T>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T> Validate for VecDeque<T>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T> Validate for Vec<T>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T, E> Validate for Result<T, E>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Source§

impl<T, S> Validate for HashSet<T, S>
where T: Validate,

Source§

fn validate(&self) -> Result<()>

Implementors§