pub struct Schema {Show 52 fields
pub ref_value: Option<String>,
pub defs: Option<IndexMap<String, Schema>>,
pub id: Option<String>,
pub comment: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub schema_type: Option<OneOrMultiTypes>,
pub default: Option<Value>,
pub deprecated: Option<bool>,
pub maximum: Option<Number>,
pub minimum: Option<Number>,
pub exclusive_maximum: Option<bool>,
pub exclusive_minimum: Option<bool>,
pub multiple_of: Option<f64>,
pub max_length: Option<u32>,
pub min_length: Option<u32>,
pub pattern: Option<String>,
pub format: Option<String>,
pub content_encoding: Option<String>,
pub content_media_type: Option<String>,
pub items: Option<OneOrMultiSchemas>,
pub max_items: Option<u32>,
pub min_items: Option<u32>,
pub unique_items: Option<bool>,
pub additional_items: Option<BoolOrSchema>,
pub contains: Option<Box<Schema>>,
pub max_contains: Option<u32>,
pub min_contains: Option<u32>,
pub unevaluated_items: Option<BoolOrSchema>,
pub properties: Option<IndexMap<String, Schema>>,
pub max_properties: Option<u32>,
pub min_properties: Option<u32>,
pub required: Option<Vec<String>>,
pub pattern_properties: Option<IndexMap<String, Schema>>,
pub additional_properties: Option<BoolOrSchema>,
pub dependent_required: Option<IndexMap<String, Vec<String>>>,
pub dependent_schemas: Option<IndexMap<String, Schema>>,
pub property_names: Option<Box<Schema>>,
pub unevaluated_properties: Option<BoolOrSchema>,
pub enum_value: Option<Vec<Value>>,
pub const_value: Option<Value>,
pub examples: Option<Vec<Value>>,
pub read_only: Option<bool>,
pub write_only: Option<bool>,
pub all_of: Option<Vec<Schema>>,
pub one_of: Option<Vec<Schema>>,
pub any_of: Option<Vec<Schema>>,
pub not: Option<Box<Schema>>,
pub if_value: Option<Box<Schema>>,
pub then_value: Option<Box<Schema>>,
pub else_value: Option<Box<Schema>>,
pub unknown: Option<Map<String, Value>>,
}
Fields§
§ref_value: Option<String>
§defs: Option<IndexMap<String, Schema>>
§id: Option<String>
§comment: Option<String>
§title: Option<String>
§description: Option<String>
§schema_type: Option<OneOrMultiTypes>
§default: Option<Value>
§deprecated: Option<bool>
§maximum: Option<Number>
§minimum: Option<Number>
§exclusive_maximum: Option<bool>
§exclusive_minimum: Option<bool>
§multiple_of: Option<f64>
§max_length: Option<u32>
§min_length: Option<u32>
§pattern: Option<String>
§format: Option<String>
§content_encoding: Option<String>
§content_media_type: Option<String>
§items: Option<OneOrMultiSchemas>
§max_items: Option<u32>
§min_items: Option<u32>
§unique_items: Option<bool>
§additional_items: Option<BoolOrSchema>
§contains: Option<Box<Schema>>
§max_contains: Option<u32>
§min_contains: Option<u32>
§unevaluated_items: Option<BoolOrSchema>
§properties: Option<IndexMap<String, Schema>>
§max_properties: Option<u32>
§min_properties: Option<u32>
§required: Option<Vec<String>>
§pattern_properties: Option<IndexMap<String, Schema>>
§additional_properties: Option<BoolOrSchema>
§dependent_required: Option<IndexMap<String, Vec<String>>>
§dependent_schemas: Option<IndexMap<String, Schema>>
§property_names: Option<Box<Schema>>
§unevaluated_properties: Option<BoolOrSchema>
§enum_value: Option<Vec<Value>>
§const_value: Option<Value>
§examples: Option<Vec<Value>>
§read_only: Option<bool>
§write_only: Option<bool>
§all_of: Option<Vec<Schema>>
§one_of: Option<Vec<Schema>>
§any_of: Option<Vec<Schema>>
§not: Option<Box<Schema>>
§if_value: Option<Box<Schema>>
§then_value: Option<Box<Schema>>
§else_value: Option<Box<Schema>>
§unknown: Option<Map<String, Value>>
Implementations§
Source§impl Schema
impl Schema
pub fn pointer(&self, keys: &Keys) -> Vec<&Schema>
pub fn maybe_type(&self, schema_type: &SchemaType) -> bool
pub fn one_type(&self) -> Option<SchemaType>
pub fn types(&self) -> HashSet<SchemaType>
pub fn debug_string(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Schema
impl Serialize for Schema
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Schema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more