pub struct ArraySchema<DS, AS, OS> {
pub items: Option<BoxedElemOrVec<DataSchema<DS, AS, OS>>>,
pub min_items: Option<u32>,
pub max_items: Option<u32>,
pub other: AS,
}Expand description
A JSON array metadata.
Fields§
§items: Option<BoxedElemOrVec<DataSchema<DS, AS, OS>>>The characteristics of the JSON array.
An item has a different semantic than a Vec of one item:
- a single item
Trepresents an array of element where every element must follow the schema defined byT; - a
Vecof one elementTrepresent a tuple of one single element, which must follow the schema defined byT.
In general, using a Vec of data schemas expresses a tuple of elements with a 1:1
correspondence.
min_items: Option<u32>The minimum number of items that have to be in the JSON array.
max_items: Option<u32>The maximum number of items that have to be in the JSON array.
other: ASArray schema extension.
Trait Implementations§
Source§impl<DS: Clone, AS: Clone, OS: Clone> Clone for ArraySchema<DS, AS, OS>
impl<DS: Clone, AS: Clone, OS: Clone> Clone for ArraySchema<DS, AS, OS>
Source§fn clone(&self) -> ArraySchema<DS, AS, OS>
fn clone(&self) -> ArraySchema<DS, AS, OS>
Returns a duplicate 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<DS, AS, OS> Default for ArraySchema<DS, AS, OS>where
AS: Default,
impl<DS, AS, OS> Default for ArraySchema<DS, AS, OS>where
AS: Default,
Source§impl<'de, DS, AS, OS> Deserialize<'de> for ArraySchema<DS, AS, OS>
impl<'de, DS, AS, OS> Deserialize<'de> for ArraySchema<DS, AS, OS>
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
Source§impl<DS, AS, OS> Serialize for ArraySchema<DS, AS, OS>
impl<DS, AS, OS> Serialize for ArraySchema<DS, AS, OS>
impl<DS, AS, OS> StructuralPartialEq for ArraySchema<DS, AS, OS>
Auto Trait Implementations§
impl<DS, AS, OS> Freeze for ArraySchema<DS, AS, OS>where
AS: Freeze,
impl<DS, AS, OS> RefUnwindSafe for ArraySchema<DS, AS, OS>
impl<DS, AS, OS> Send for ArraySchema<DS, AS, OS>
impl<DS, AS, OS> Sync for ArraySchema<DS, AS, OS>
impl<DS, AS, OS> Unpin for ArraySchema<DS, AS, OS>
impl<DS, AS, OS> UnwindSafe for ArraySchema<DS, AS, OS>
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