#[non_exhaustive]pub struct Array {
pub schema_type: SchemaType,
pub title: Option<String>,
pub items: Box<RefOr<Schema>>,
pub description: Option<String>,
pub deprecated: Option<Deprecated>,
pub example: Option<Value>,
pub default: Option<Value>,
pub max_items: Option<usize>,
pub min_items: Option<usize>,
pub unique_items: bool,
pub xml: Option<Xml>,
pub nullable: bool,
}
Expand description
Array represents Vec
or slice
type of items.
See Schema::Array
for more details.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.schema_type: SchemaType
Type will always be SchemaType::Array
title: Option<String>
Changes the Array
title.
items: Box<RefOr<Schema>>
Schema representing the array items type.
description: Option<String>
Description of the Array
. Markdown syntax is supported.
deprecated: Option<Deprecated>
Marks the Array
deprecated.
example: Option<Value>
Example shown in UI of the value for richer documentation.
default: Option<Value>
Default value which is provided when user has not provided the input in Swagger UI.
max_items: Option<usize>
Max length of the array.
min_items: Option<usize>
Min length of the array.
unique_items: bool
Setting this to true
will validate successfully if all elements of this Array
are
unique.
xml: Option<Xml>
Xml format of the array.
nullable: bool
Set true
to allow "null"
to be used as value for given type.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Array
impl<'de> Deserialize<'de> for Array
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 From<Array> for ArrayBuilder
impl From<Array> for ArrayBuilder
source§impl From<ArrayBuilder> for Array
impl From<ArrayBuilder> for Array
source§fn from(value: ArrayBuilder) -> Self
fn from(value: ArrayBuilder) -> Self
Converts to this type from the input type.
source§impl PartialEq for Array
impl PartialEq for Array
impl StructuralPartialEq for Array
Auto Trait Implementations§
impl Freeze for Array
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)