Trait mas_jose::claims::Validator

source ·
pub trait Validator<T> {
    type Error;

    // Required method
    fn validate(&self, value: &T) -> Result<(), Self::Error>;
}

Required Associated Types§

source

type Error

The associated error type returned by this validator.

Required Methods§

source

fn validate(&self, value: &T) -> Result<(), Self::Error>

Validate a claim value

§Errors

Returns an error if the value is invalid.

Implementations on Foreign Types§

source§

impl<T> Validator<T> for ()

§

type Error = Infallible

source§

fn validate(&self, _value: &T) -> Result<(), Self::Error>

Implementors§