pub struct Validate();
Expand description
Rule to check the rules of the inner type
§Example
use type_rules::prelude::*;
#[derive(Validator)]
struct Password(#[rule(MinLength(8))] String);
#[derive(Validator)]
struct User {
username: String,
#[rule(Validate())]
password: Password,
};
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Validate
impl RefUnwindSafe for Validate
impl Send for Validate
impl Sync for Validate
impl Unpin for Validate
impl UnwindSafe for Validate
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