pub struct MinLength(pub usize);
Expand description
Rule to constraint the minimum
length of any type that implements AsRef<str>
such
as String
or &str
§Example
use type_rules::prelude::*;
#[derive(Validator)]
struct Password(#[rule(MinLength(8))] String);
Tuple Fields§
§0: usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MinLength
impl RefUnwindSafe for MinLength
impl Send for MinLength
impl Sync for MinLength
impl Unpin for MinLength
impl UnwindSafe for MinLength
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