pub struct SchemaSource { /* private fields */ }Expand description
Schema text plus enough context (a base URI, and which syntax it’s
written in) to parse it and resolve any include/externalRef it
contains. This crate never reads files or network resources itself —
callers supply schema text directly, and a SchemaResolver for
anything the schema references by href.
Implementations§
Source§impl SchemaSource
impl SchemaSource
Sourcepub fn new(
text: impl Into<String>,
base_uri: impl Into<String>,
syntax: SchemaSyntax,
) -> Self
pub fn new( text: impl Into<String>, base_uri: impl Into<String>, syntax: SchemaSyntax, ) -> Self
Builds a source from its text, base URI (used to resolve any
relative hrefs the schema references), and syntax.
Sourcepub fn syntax(&self) -> SchemaSyntax
pub fn syntax(&self) -> SchemaSyntax
Which syntax Self::text is written in.
Trait Implementations§
Source§impl Clone for SchemaSource
impl Clone for SchemaSource
Source§impl Debug for SchemaSource
impl Debug for SchemaSource
impl Eq for SchemaSource
Source§impl PartialEq for SchemaSource
impl PartialEq for SchemaSource
impl StructuralPartialEq for SchemaSource
Auto Trait Implementations§
impl Freeze for SchemaSource
impl RefUnwindSafe for SchemaSource
impl Send for SchemaSource
impl Sync for SchemaSource
impl Unpin for SchemaSource
impl UnsafeUnpin for SchemaSource
impl UnwindSafe for SchemaSource
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