Struct schemars::schema::ObjectValidation
source · [−]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.
min_properties: Option<u32>
The minProperties
keyword.
required: Set<String>
The required
keyword.
properties: Map<String, Schema>
The properties
keyword.
pattern_properties: Map<String, Schema>
The patternProperties
keyword.
additional_properties: Option<Box<Schema>>
The additionalProperties
keyword.
property_names: Option<Box<Schema>>
The propertyNames
keyword.
Trait Implementations
sourceimpl Clone for ObjectValidation
impl Clone for ObjectValidation
sourcefn clone(&self) -> ObjectValidation
fn clone(&self) -> ObjectValidation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ObjectValidation
impl Debug for ObjectValidation
sourceimpl Default for ObjectValidation
impl Default for ObjectValidation
sourcefn default() -> ObjectValidation
fn default() -> ObjectValidation
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ObjectValidation where
ObjectValidation: Default,
impl<'de> Deserialize<'de> for ObjectValidation where
ObjectValidation: Default,
sourcefn 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
sourceimpl PartialEq<ObjectValidation> for ObjectValidation
impl PartialEq<ObjectValidation> for ObjectValidation
sourcefn eq(&self, other: &ObjectValidation) -> bool
fn eq(&self, other: &ObjectValidation) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ObjectValidation) -> bool
fn ne(&self, other: &ObjectValidation) -> bool
This method tests for !=
.
sourceimpl Serialize for ObjectValidation
impl Serialize for ObjectValidation
impl StructuralPartialEq for ObjectValidation
Auto Trait Implementations
impl RefUnwindSafe for ObjectValidation
impl Send for ObjectValidation
impl Sync for ObjectValidation
impl Unpin for ObjectValidation
impl UnwindSafe for ObjectValidation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more