Struct schemars::schema::SubschemaValidation
source · pub struct SubschemaValidation {
pub all_of: Option<Vec<Schema>>,
pub any_of: Option<Vec<Schema>>,
pub one_of: Option<Vec<Schema>>,
pub not: Option<Box<Schema>>,
pub if_schema: Option<Box<Schema>>,
pub then_schema: Option<Box<Schema>>,
pub else_schema: Option<Box<Schema>>,
}
Expand description
Properties of a SchemaObject
which define validation assertions in terms of other schemas.
Fields§
§all_of: Option<Vec<Schema>>
The allOf
keyword.
any_of: Option<Vec<Schema>>
The anyOf
keyword.
one_of: Option<Vec<Schema>>
The oneOf
keyword.
not: Option<Box<Schema>>
The not
keyword.
if_schema: Option<Box<Schema>>
The if
keyword.
then_schema: Option<Box<Schema>>
The then
keyword.
else_schema: Option<Box<Schema>>
The else
keyword.
Trait Implementations§
source§impl Clone for SubschemaValidation
impl Clone for SubschemaValidation
source§fn clone(&self) -> SubschemaValidation
fn clone(&self) -> SubschemaValidation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SubschemaValidation
impl Debug for SubschemaValidation
source§impl Default for SubschemaValidation
impl Default for SubschemaValidation
source§fn default() -> SubschemaValidation
fn default() -> SubschemaValidation
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SubschemaValidationwhere
SubschemaValidation: Default,
impl<'de> Deserialize<'de> for SubschemaValidationwhere SubschemaValidation: Default,
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 JsonSchema for SubschemaValidation
impl JsonSchema for SubschemaValidation
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq<SubschemaValidation> for SubschemaValidation
impl PartialEq<SubschemaValidation> for SubschemaValidation
source§fn eq(&self, other: &SubschemaValidation) -> bool
fn eq(&self, other: &SubschemaValidation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.