pub struct RootSchema<'r> {
pub meta_schema: Option<String>,
pub schema: YamlSchema<'r>,
}Expand description
A RootSchema represents the root document in a schema document, and includes additional
fields such as $schema that are not allowed in subschemas. It also provides a way to
resolve references to other schemas.
Fields§
§meta_schema: Option<String>§schema: YamlSchema<'r>Implementations§
Source§impl<'r> RootSchema<'r>
impl<'r> RootSchema<'r>
Sourcepub fn new(schema: YamlSchema<'r>) -> Self
pub fn new(schema: YamlSchema<'r>) -> Self
Create a new RootSchema with a given schema
Sourcepub fn resolve(&self, pointer: &Pointer) -> Option<&YamlSchema<'_>>
pub fn resolve(&self, pointer: &Pointer) -> Option<&YamlSchema<'_>>
Resolve a JSON Pointer to an element in the schema.
Trait Implementations§
Source§impl<'r> Debug for RootSchema<'r>
impl<'r> Debug for RootSchema<'r>
Source§impl<'r> PartialEq for RootSchema<'r>
impl<'r> PartialEq for RootSchema<'r>
Source§impl<'r> TryFrom<&MarkedYaml<'r>> for RootSchema<'r>
impl<'r> TryFrom<&MarkedYaml<'r>> for RootSchema<'r>
Source§impl Validator for RootSchema<'_>
impl Validator for RootSchema<'_>
impl<'r> StructuralPartialEq for RootSchema<'r>
Auto Trait Implementations§
impl<'r> Freeze for RootSchema<'r>
impl<'r> RefUnwindSafe for RootSchema<'r>
impl<'r> Send for RootSchema<'r>
impl<'r> Sync for RootSchema<'r>
impl<'r> Unpin for RootSchema<'r>
impl<'r> UnsafeUnpin for RootSchema<'r>
impl<'r> UnwindSafe for RootSchema<'r>
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