Struct serde_json_schema::Schema
source · pub struct Schema(/* private fields */);
Expand description
Represents a full JSON Schema Document
Implementations§
source§impl Schema
impl Schema
pub fn draft_version(&self) -> Option<&str>
pub fn id(&self) -> Option<&SchemaId>
pub fn schema(&self) -> Option<&Url>
pub fn description(&self) -> Option<&str>
pub fn specification(&self) -> Option<&PropertyInstance>
pub fn properties(&self) -> Option<&HashMap<String, Property>>
pub fn required_properties(&self) -> Option<&Vec<String>>
pub fn as_null(&self) -> Option<&PropertyInstance>
pub fn as_boolean(&self) -> Option<&PropertyInstance>
pub fn as_integer(&self) -> Option<&PropertyInstance>
pub fn as_object(&self) -> Option<&PropertyInstance>
pub fn as_array(&self) -> Option<&PropertyInstance>
pub fn as_number(&self) -> Option<&PropertyInstance>
pub fn validate(&self, json: &Value) -> Result<(), Vec<String>>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Schema
impl PartialEq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations§
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