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

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

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.