Struct stencila_schema::ArrayValidator [−][src]
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
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
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for ArrayValidator
impl Send for ArrayValidator
impl Sync for ArrayValidator
impl Unpin for ArrayValidator
impl UnwindSafe for ArrayValidator
Blanket Implementations
Mutably borrows from an owned value. Read more