pub enum Schema {
Url(Url),
File(PathBuf),
Schema(String),
NamedSchema(String, String),
}
Expand description
Configuration for the schemas to load used in ParserConfig
.
Variants§
Url(Url)
Load a schema from the provided URL.
File(PathBuf)
Load a schema from the provided file path.
Schema(String)
Load the schema from the provided string.
NamedSchema(String, String)
Load the schema from the provided strings: (name, schema)
.
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn url<T>(value: T) -> Self
pub fn url<T>(value: T) -> Self
Create a Schema::Url
from the passed value
.
Sourcepub fn file<T>(value: T) -> Self
pub fn file<T>(value: T) -> Self
Create a Schema::File
from the passed value
.
Sourcepub fn schema<T>(value: T) -> Self
pub fn schema<T>(value: T) -> Self
Create a Schema::Schema
from the passed value
.
Sourcepub fn named_schema<S, T>(name: S, value: T) -> Self
pub fn named_schema<S, T>(name: S, value: T) -> Self
Create a Schema::NamedSchema
from the passed name
and value
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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