validators 0.25.3

This library is designed for validating and modeling user input. The crate includes models, functions, traits, errors, and other dependencies.
Documentation
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum TriAllow {
    Must,
    Allow,
    Disallow,
}

impl TriAllow {
    #[inline]
    pub const fn allow(self) -> bool {
        match self {
            Self::Must => true,
            Self::Allow => true,
            Self::Disallow => false,
        }
    }

    #[inline]
    pub const fn disallow(self) -> bool {
        match self {
            Self::Must => false,
            Self::Allow => false,
            Self::Disallow => true,
        }
    }

    #[inline]
    pub const fn must(self) -> bool {
        match self {
            Self::Must => true,
            Self::Allow => false,
            Self::Disallow => false,
        }
    }
}