Struct schemars::schema::StringValidation
source · [−]pub struct StringValidation {
pub max_length: Option<u32>,
pub min_length: Option<u32>,
pub pattern: Option<String>,
}
Expand description
Properties of a SchemaObject
which define validation assertions for strings.
Fields
max_length: Option<u32>
The maxLength
keyword.
min_length: Option<u32>
The minLength
keyword.
pattern: Option<String>
The pattern
keyword.
Trait Implementations
sourceimpl Clone for StringValidation
impl Clone for StringValidation
sourcefn clone(&self) -> StringValidation
fn clone(&self) -> StringValidation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StringValidation
impl Debug for StringValidation
sourceimpl Default for StringValidation
impl Default for StringValidation
sourcefn default() -> StringValidation
fn default() -> StringValidation
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for StringValidation where
StringValidation: Default,
impl<'de> Deserialize<'de> for StringValidation where
StringValidation: Default,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<StringValidation> for StringValidation
impl PartialEq<StringValidation> for StringValidation
sourcefn eq(&self, other: &StringValidation) -> bool
fn eq(&self, other: &StringValidation) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StringValidation) -> bool
fn ne(&self, other: &StringValidation) -> bool
This method tests for !=
.
sourceimpl Serialize for StringValidation
impl Serialize for StringValidation
impl StructuralPartialEq for StringValidation
Auto Trait Implementations
impl RefUnwindSafe for StringValidation
impl Send for StringValidation
impl Sync for StringValidation
impl Unpin for StringValidation
impl UnwindSafe for StringValidation
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more