pub struct ObjectValidation {
    pub max_properties: Option<u32>,
    pub min_properties: Option<u32>,
    pub required: Set<String>,
    pub properties: Map<String, Schema>,
    pub pattern_properties: Map<String, Schema>,
    pub additional_properties: Option<Box<Schema>>,
    pub property_names: Option<Box<Schema>>,
}
Expand description

Properties of a SchemaObject which define validation assertions for objects.

Fields

max_properties: Option<u32>

The maxProperties keyword.

See JSON Schema Validation 6.5.1. “maxProperties”.

min_properties: Option<u32>

The minProperties keyword.

See JSON Schema Validation 6.5.2. “minProperties”.

required: Set<String>properties: Map<String, Schema>

The properties keyword.

See JSON Schema 9.3.2.1. “properties”.

pattern_properties: Map<String, Schema>

The patternProperties keyword.

See JSON Schema 9.3.2.2. “patternProperties”.

additional_properties: Option<Box<Schema>>

The additionalProperties keyword.

See JSON Schema 9.3.2.3. “additionalProperties”.

property_names: Option<Box<Schema>>

The propertyNames keyword.

See JSON Schema 9.3.2.5. “propertyNames”.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

The name of the generated JSON Schema. Read more

Generates a JSON Schema for this type. Read more

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.