pub struct MinLengthRule { /* private fields */ }Expand description
Validates that a string meets a minimum length requirement.
§Examples
use mx20022_validate::rules::length::MinLengthRule;
use mx20022_validate::rules::Rule;
let rule = MinLengthRule::new(1);
assert!(rule.validate("a", "/path").is_empty());
assert!(!rule.validate("", "/path").is_empty());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MinLengthRule
impl RefUnwindSafe for MinLengthRule
impl Send for MinLengthRule
impl Sync for MinLengthRule
impl Unpin for MinLengthRule
impl UnsafeUnpin for MinLengthRule
impl UnwindSafe for MinLengthRule
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