pub struct Resource { /* private fields */ }Expand description
An owned document with a concrete interpretation under a JSON Schema specification.
Implementations§
Source§impl Resource
impl Resource
Sourcepub fn from_contents(contents: Value) -> Result<Resource, Error>
pub fn from_contents(contents: Value) -> Result<Resource, Error>
Create a resource with automatically detecting specification which applies to the contents.
§Errors
On unknown $schema value it returns Error::UnknownSpecification
pub fn as_ref(&self) -> ResourceRef<'_>
Trait Implementations§
impl Eq for Resource
impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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