pub enum SchemaType {
Primitive {
rust_type: String,
},
Object {
properties: BTreeMap<String, PropertyInfo>,
required: HashSet<String>,
additional_properties: bool,
},
DiscriminatedUnion {
discriminator_field: String,
variants: Vec<UnionVariant>,
},
Union {
variants: Vec<SchemaRef>,
},
Array {
item_type: Box<SchemaType>,
},
StringEnum {
values: Vec<String>,
},
ExtensibleEnum {
known_values: Vec<String>,
},
Composition {
schemas: Vec<SchemaRef>,
},
Reference {
target: String,
},
}Variants§
Primitive
Simple primitive type
Object
Object with properties
Fields
§
properties: BTreeMap<String, PropertyInfo>DiscriminatedUnion
Discriminated union (oneOf + discriminator)
Union
Simple union (anyOf without discriminator)
Array
Array type
Fields
§
item_type: Box<SchemaType>StringEnum
String enum
ExtensibleEnum
Extensible enum with known values and custom variant
Composition
Schema composition (allOf)
Reference
Reference to another schema
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 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