Trait prae::Guard [−][src]
pub trait Guard { type Target; type Error; fn adjust(v: &mut Self::Target); fn validate(v: &Self::Target) -> Option<Self::Error>; }
Expand description
A trait that represents a guard bound, e.g. a type that is being guarded, adjust
/validate
functions and a possible validation error.
Associated Types
Required methods
A function that can make small adjustments of the provided value before validation.