pub struct Scope { /* private fields */ }
Implementations§
Source§impl Scope
impl Scope
pub fn new() -> Scope
pub fn without_formats() -> Scope
pub fn with_formats<F>(build_formats: F) -> Scopewhere
F: FnOnce(&mut FormatBuilders),
pub fn compile( &mut self, def: Value, ban_unknown: bool, ) -> Result<Url, SchemaError>
pub fn compile_with_id( &mut self, id: &Url, def: Value, ban_unknown: bool, ) -> Result<(), SchemaError>
pub fn compile_and_return<'a>( &'a mut self, def: Value, ban_unknown: bool, ) -> Result<ScopedSchema<'a>, SchemaError>
pub fn compile_and_return_with_id<'a>( &'a mut self, id: &Url, def: Value, ban_unknown: bool, ) -> Result<ScopedSchema<'a>, SchemaError>
pub fn add_keyword<T>(&mut self, keys: Vec<&'static str>, keyword: T)where
T: Keyword + 'static,
pub fn resolve<'a>(&'a self, id: &Url) -> Option<ScopedSchema<'a>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scope
impl !RefUnwindSafe for Scope
impl !Send for Scope
impl !Sync for Scope
impl Unpin for Scope
impl !UnwindSafe for Scope
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