validators 0.26.0

This library is designed for validating and modeling user input. The crate includes models, functions, traits, errors, and other dependencies.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::fmt::{self, Display, Formatter};

/// Error from the `boolean` validator.
#[derive(Debug, Clone)]
pub struct BooleanError;

impl Display for BooleanError {
    #[inline]
    fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
        f.write_str("invalid boolean")
    }
}

impl core::error::Error for BooleanError {}