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§
source§impl Clone for RootSchema
impl Clone for RootSchema
source§fn clone(&self) -> RootSchema
fn clone(&self) -> RootSchema
Returns a copy 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 moresource§impl Debug for RootSchema
impl Debug for RootSchema
source§impl Default for RootSchema
impl Default for RootSchema
source§fn default() -> RootSchema
fn default() -> RootSchema
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RootSchemawhere
RootSchema: Default,
impl<'de> Deserialize<'de> for RootSchemawhere
RootSchema: Default,
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 PartialEq for RootSchema
impl PartialEq for RootSchema
source§impl Serialize for RootSchema
impl Serialize for RootSchema
impl StructuralPartialEq for RootSchema
Auto Trait Implementations§
impl Freeze for RootSchema
impl RefUnwindSafe for RootSchema
impl Send for RootSchema
impl Sync for RootSchema
impl Unpin for RootSchema
impl UnwindSafe for RootSchema
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)