pub enum PrimitiveSchemaDefinition {
StringSchema(StringSchema),
NumberSchema(NumberSchema),
BooleanSchema(BooleanSchema),
EnumSchema(EnumSchema),
}
Expand description
Restricted schema definitions that only allow primitive types without nested objects or arrays.
JSON schema
{
"description": "Restricted schema definitions that only allow primitive types\nwithout nested objects or arrays.",
"anyOf": [
{
"$ref": "#/definitions/StringSchema"
},
{
"$ref": "#/definitions/NumberSchema"
},
{
"$ref": "#/definitions/BooleanSchema"
},
{
"$ref": "#/definitions/EnumSchema"
}
]
}
Variants§
StringSchema(StringSchema)
NumberSchema(NumberSchema)
BooleanSchema(BooleanSchema)
EnumSchema(EnumSchema)
Trait Implementations§
Source§impl Clone for PrimitiveSchemaDefinition
impl Clone for PrimitiveSchemaDefinition
Source§fn clone(&self) -> PrimitiveSchemaDefinition
fn clone(&self) -> PrimitiveSchemaDefinition
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 PrimitiveSchemaDefinition
impl Debug for PrimitiveSchemaDefinition
Source§impl<'de> Deserialize<'de> for PrimitiveSchemaDefinition
impl<'de> Deserialize<'de> for PrimitiveSchemaDefinition
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
Source§impl From<BooleanSchema> for PrimitiveSchemaDefinition
impl From<BooleanSchema> for PrimitiveSchemaDefinition
Source§fn from(value: BooleanSchema) -> Self
fn from(value: BooleanSchema) -> Self
Converts to this type from the input type.
Source§impl From<EnumSchema> for PrimitiveSchemaDefinition
impl From<EnumSchema> for PrimitiveSchemaDefinition
Source§fn from(value: EnumSchema) -> Self
fn from(value: EnumSchema) -> Self
Converts to this type from the input type.
Source§impl From<NumberSchema> for PrimitiveSchemaDefinition
impl From<NumberSchema> for PrimitiveSchemaDefinition
Source§fn from(value: NumberSchema) -> Self
fn from(value: NumberSchema) -> Self
Converts to this type from the input type.
Source§impl From<StringSchema> for PrimitiveSchemaDefinition
impl From<StringSchema> for PrimitiveSchemaDefinition
Source§fn from(value: StringSchema) -> Self
fn from(value: StringSchema) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PrimitiveSchemaDefinition
impl RefUnwindSafe for PrimitiveSchemaDefinition
impl Send for PrimitiveSchemaDefinition
impl Sync for PrimitiveSchemaDefinition
impl Unpin for PrimitiveSchemaDefinition
impl UnwindSafe for PrimitiveSchemaDefinition
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