Struct type_rules::rules::MinLength
source · [−]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 RefUnwindSafe for MinLength
impl Send for MinLength
impl Sync for MinLength
impl Unpin for MinLength
impl UnwindSafe for MinLength
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more