pub struct CustomValidator<T, F>{ /* private fields */ }Expand description
Constraint that validates using a custom function.
Implementations§
Trait Implementations§
Source§impl<T, F> Constraint<T> for CustomValidator<T, F>
impl<T, F> Constraint<T> for CustomValidator<T, F>
Source§fn validate(&self, value: &T) -> ValidationResult
fn validate(&self, value: &T) -> ValidationResult
Validate the given value.
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Get a description of this constraint.
Auto Trait Implementations§
impl<T, F> Freeze for CustomValidator<T, F>where
F: Freeze,
impl<T, F> RefUnwindSafe for CustomValidator<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for CustomValidator<T, F>
impl<T, F> Sync for CustomValidator<T, F>
impl<T, F> Unpin for CustomValidator<T, F>
impl<T, F> UnsafeUnpin for CustomValidator<T, F>where
F: UnsafeUnpin,
impl<T, F> UnwindSafe for CustomValidator<T, F>where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more