pub trait Validate {
type Claims;
// Required method
fn validate(&self, claims: &Self::Claims) -> Result<(), PasetoError>;
// Provided methods
fn and_then<V>(self, other: V) -> impl Validate<Claims = Self::Claims>
where Self: Sized,
V: Validate<Claims = Self::Claims> { ... }
fn map<T>(
self,
f: impl for<'a> Fn(&'a T) -> &'a Self::Claims,
) -> impl Validate<Claims = T>
where Self: Sized { ... }
}Expand description
Validation rules for the claims in a PASETO