Struct type_rules::rules::MinMaxLength
source · [−]Expand description
Rule to constraint the minimum and maximum
length of any type that implements AsRef<str>
such
as String
or &str
Example
use type_rules::prelude::*;
#[derive(Validator)]
struct NewUser {
#[rule(MinMaxLength(3, 50))]
username: String,
#[rule(MinMaxLength(8, 100))]
password: String,
}
Tuple Fields
0: usize
1: usize
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MinMaxLength
impl Send for MinMaxLength
impl Sync for MinMaxLength
impl Unpin for MinMaxLength
impl UnwindSafe for MinMaxLength
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