pub struct StringSchema { /* private fields */ }Expand description
A schema for a string
Implementations§
Source§impl StringSchema
impl StringSchema
Sourcepub fn with_length(
self,
length: impl Into<Option<RangeInclusive<usize>>>,
) -> Self
pub fn with_length( self, length: impl Into<Option<RangeInclusive<usize>>>, ) -> Self
Set the length range of the string
Sourcepub fn with_pattern(self, pattern: impl ToString) -> Self
pub fn with_pattern(self, pattern: impl ToString) -> Self
Set a regex pattern the string must match
Trait Implementations§
Source§impl Clone for StringSchema
impl Clone for StringSchema
Source§fn clone(&self) -> StringSchema
fn clone(&self) -> StringSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StringSchema
impl Debug for StringSchema
Source§impl Default for StringSchema
impl Default for StringSchema
Auto Trait Implementations§
impl Freeze for StringSchema
impl RefUnwindSafe for StringSchema
impl Send for StringSchema
impl Sync for StringSchema
impl Unpin for StringSchema
impl UnwindSafe for StringSchema
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