pub struct ArrayValidator {
pub type_: ArrayValidator_,
pub contains: Option<Box<ValidatorTypes>>,
pub id: Option<Box<String>>,
pub items_validator: Option<Box<ValidatorTypes>>,
pub max_items: Option<u32>,
pub min_items: Option<u32>,
pub unique_items: Option<Boolean>,
}
Expand description
A validator specifying constraints on an array node.
Fields§
§type_: ArrayValidator_
The name of this type
contains: Option<Box<ValidatorTypes>>
An array node is valid if at least one of its items is valid against the contains
schema.
id: Option<Box<String>>
The identifier for this item.
items_validator: Option<Box<ValidatorTypes>>
Another validator node specifying the constraints on all items in the array.
max_items: Option<u32>
An array node is valid if its size is less than, or equal to, this value.
min_items: Option<u32>
An array node is valid if its size is greater than, or equal to, this value.
unique_items: Option<Boolean>
A flag to indicate that each value in the array should be unique.
Trait Implementations§
Source§impl Clone for ArrayValidator
impl Clone for ArrayValidator
Source§fn clone(&self) -> ArrayValidator
fn clone(&self) -> ArrayValidator
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 ArrayValidator
impl Debug for ArrayValidator
Source§impl Default for ArrayValidator
impl Default for ArrayValidator
Source§impl<'de> Deserialize<'de> for ArrayValidatorwhere
ArrayValidator: Default,
impl<'de> Deserialize<'de> for ArrayValidatorwhere
ArrayValidator: 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
Auto Trait Implementations§
impl Freeze for ArrayValidator
impl RefUnwindSafe for ArrayValidator
impl Send for ArrayValidator
impl Sync for ArrayValidator
impl Unpin for ArrayValidator
impl UnwindSafe for ArrayValidator
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