Struct schemars::schema::RootSchema [−][src]
pub struct RootSchema {
pub meta_schema: Option<String>,
pub schema: SchemaObject,
pub definitions: Map<String, Schema>,
}
Expand description
The root object of a JSON Schema document.
Fields
meta_schema: Option<String>
The $schema
keyword.
schema: SchemaObject
The root schema itself.
definitions: Map<String, Schema>
The definitions
keyword.
In JSON Schema draft 2019-09 this was replaced by $defs, but in Schemars this is still
serialized as definitions
for backward-compatibility.
See JSON Schema 8.2.5. Schema Re-Use With “$defs”, and JSON Schema (draft 07) 9. Schema Re-Use With “definitions”.
Trait Implementations
Returns the “default value” for a type. Read more
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RootSchema
impl Send for RootSchema
impl Sync for RootSchema
impl Unpin for RootSchema
impl UnwindSafe for RootSchema
Blanket Implementations
Mutably borrows from an owned value. Read more