Struct schemars::schema::RootSchema
source · [−]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
sourceimpl Clone for RootSchema
impl Clone for RootSchema
sourcefn clone(&self) -> RootSchema
fn clone(&self) -> RootSchema
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RootSchema
impl Debug for RootSchema
sourceimpl Default for RootSchema
impl Default for RootSchema
sourcefn default() -> RootSchema
fn default() -> RootSchema
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for RootSchema where
RootSchema: Default,
impl<'de> Deserialize<'de> for RootSchema where
RootSchema: Default,
sourcefn 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
sourceimpl PartialEq<RootSchema> for RootSchema
impl PartialEq<RootSchema> for RootSchema
sourcefn eq(&self, other: &RootSchema) -> bool
fn eq(&self, other: &RootSchema) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RootSchema) -> bool
fn ne(&self, other: &RootSchema) -> bool
This method tests for !=
.
sourceimpl Serialize for RootSchema
impl Serialize for RootSchema
impl StructuralPartialEq for RootSchema
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more