pub struct StringType { /* private fields */ }Implementations§
Source§impl StringType
impl StringType
Sourcepub fn min_length(self, min: usize) -> Self
pub fn min_length(self, min: usize) -> Self
Set the minimum length of the string.
Sourcepub fn max_length(self, max: usize) -> Self
pub fn max_length(self, max: usize) -> Self
Set the maximum length of the string.
Sourcepub fn starts_with(self, value: &str) -> Self
pub fn starts_with(self, value: &str) -> Self
Set the expected starting of the string.
Sourcepub fn trim_start(self) -> Self
pub fn trim_start(self) -> Self
Trim the start of the string before validation.
Sourcepub fn to_lowercase(self) -> Self
pub fn to_lowercase(self) -> Self
Convert the string to lowercase before validation.
Sourcepub fn to_uppercase(self) -> Self
pub fn to_uppercase(self) -> Self
Convert the string to uppercase before validation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StringType
impl !RefUnwindSafe for StringType
impl !Send for StringType
impl !Sync for StringType
impl Unpin for StringType
impl !UnwindSafe for StringType
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