#[non_exhaustive]pub enum SchemaType {
String {
enum_values: Option<Vec<String>>,
default: Option<String>,
},
Number {
minimum: Option<f64>,
maximum: Option<f64>,
default: Option<f64>,
},
Integer {
minimum: Option<i64>,
maximum: Option<i64>,
default: Option<i64>,
},
Boolean {
default: Option<bool>,
},
Array {
items: Option<Box<PropertyDef>>,
},
Object {
properties: HashMap<String, PropertyDef>,
required: Vec<String>,
},
Any,
}Expand description
Property type with constraints.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
String
Number
Integer
Boolean
Array
Fields
§
items: Option<Box<PropertyDef>>Object
Any
Fallback for unrecognized schemas — accepts any value.
Trait Implementations§
Source§impl Clone for SchemaType
impl Clone for SchemaType
Source§fn clone(&self) -> SchemaType
fn clone(&self) -> SchemaType
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 moreAuto Trait Implementations§
impl Freeze for SchemaType
impl RefUnwindSafe for SchemaType
impl Send for SchemaType
impl Sync for SchemaType
impl Unpin for SchemaType
impl UnsafeUnpin for SchemaType
impl UnwindSafe for SchemaType
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