pub struct MinLengthValidator { /* private fields */ }Expand description
Validator for minimum length
Implementations§
Source§impl MinLengthValidator
impl MinLengthValidator
pub fn new(min_length: usize) -> Self
pub fn with_priority(self, priority: Priority) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Debug for MinLengthValidator
impl Debug for MinLengthValidator
Source§impl Validator for MinLengthValidator
impl Validator for MinLengthValidator
Source§fn validate(&self, input: &str) -> ValidationResult
fn validate(&self, input: &str) -> ValidationResult
Validate complete input
Source§fn partial_validate(
&self,
input: &str,
_cursor_pos: usize,
) -> PartialValidationResult
fn partial_validate( &self, input: &str, _cursor_pos: usize, ) -> PartialValidationResult
Validate partial input during typing
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get human-readable description of this validator
Auto Trait Implementations§
impl Freeze for MinLengthValidator
impl RefUnwindSafe for MinLengthValidator
impl Send for MinLengthValidator
impl Sync for MinLengthValidator
impl Unpin for MinLengthValidator
impl UnwindSafe for MinLengthValidator
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