pub struct StringLiteral {
pub min_length: Option<u64>,
pub max_length: Option<u64>,
pub pattern: Option<String>,
pub format: Option<StringFormat>,
pub enumeration: Option<Vec<String>>,
}
Expand description
The constraints that may be applied to an string literal schema.
Fields§
§min_length: Option<u64>
The minimum length of the string.
max_length: Option<u64>
The maximum length of the string.s
pattern: Option<String>
The pattern that the string must match.
format: Option<StringFormat>
The format that the string must be in.
enumeration: Option<Vec<String>>
A list of possible values for the string.
Trait Implementations§
Source§impl Clone for StringLiteral
impl Clone for StringLiteral
Source§fn clone(&self) -> StringLiteral
fn clone(&self) -> StringLiteral
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 StringLiteral
impl Debug for StringLiteral
Source§impl<'de> Deserialize<'de> for StringLiteral
impl<'de> Deserialize<'de> for StringLiteral
Source§fn 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
Auto Trait Implementations§
impl Freeze for StringLiteral
impl RefUnwindSafe for StringLiteral
impl Send for StringLiteral
impl Sync for StringLiteral
impl Unpin for StringLiteral
impl UnwindSafe for StringLiteral
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