pub enum ShapeSchema {
Any,
Object(Vec<(String, ShapeSchema)>, Vec<String>),
Array(Box<ShapeSchema>),
String,
Number,
Integer,
Boolean,
Null,
}Expand description
A minimal, closed schema vocabulary that lowers to standard JSON Schema.
Variants§
Any
Matches any value. Lowers to the empty schema {}.
Object(Vec<(String, ShapeSchema)>, Vec<String>)
A JSON object with named properties and a list of required property
names. Lowers to {"type":"object","properties":{...},"required":[...]}.
Array(Box<ShapeSchema>)
A JSON array whose items all match the inner schema. Lowers to
{"type":"array","items":...}.
String
A JSON string. Lowers to {"type":"string"}.
Number
A JSON number. Lowers to {"type":"number"}.
Integer
A JSON integer. Lowers to {"type":"integer"}.
Boolean
A JSON boolean. Lowers to {"type":"boolean"}.
Null
JSON null. Lowers to {"type":"null"}.
Trait Implementations§
Source§impl Clone for ShapeSchema
impl Clone for ShapeSchema
Source§fn clone(&self) -> ShapeSchema
fn clone(&self) -> ShapeSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ShapeSchema
impl Debug for ShapeSchema
impl Eq for ShapeSchema
Source§impl PartialEq for ShapeSchema
impl PartialEq for ShapeSchema
Source§fn eq(&self, other: &ShapeSchema) -> bool
fn eq(&self, other: &ShapeSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ShapeSchema
Auto Trait Implementations§
impl Freeze for ShapeSchema
impl RefUnwindSafe for ShapeSchema
impl Send for ShapeSchema
impl Sync for ShapeSchema
impl Unpin for ShapeSchema
impl UnsafeUnpin for ShapeSchema
impl UnwindSafe for ShapeSchema
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