pub struct StringSchema {
pub description: Option<String>,
pub format: Option<StringSchemaFormat>,
pub max_length: Option<i64>,
pub min_length: Option<i64>,
pub title: Option<String>,
/* private fields */
}
Expand description
StringSchema
JSON schema
{
"type": "object",
"required": [
"type"
],
"properties": {
"description": {
"type": "string"
},
"format": {
"type": "string",
"enum": [
"date",
"date-time",
"email",
"uri"
]
},
"maxLength": {
"type": "integer"
},
"minLength": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
}
}
}
Fields§
§description: Option<String>
§format: Option<StringSchemaFormat>
§max_length: Option<i64>
§min_length: Option<i64>
§title: Option<String>
Implementations§
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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StringSchema
impl Debug for StringSchema
Source§impl<'de> Deserialize<'de> for StringSchema
impl<'de> Deserialize<'de> for StringSchema
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StringSchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StringSchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<StringSchema> for PrimitiveSchemaDefinition
impl From<StringSchema> for PrimitiveSchemaDefinition
Source§fn from(value: StringSchema) -> PrimitiveSchemaDefinition
fn from(value: StringSchema) -> PrimitiveSchemaDefinition
Converts to this type from the input type.
Source§impl Serialize for StringSchema
impl Serialize for StringSchema
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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