pub struct SchemaProperty {
pub reference: Option<String>,
pub description: Option<String>,
pub all_of: Option<Vec<Box<SchemaProperty>>>,
pub kind: Option<SchemaType>,
pub minimum: Option<u64>,
pub items: Option<Box<Schema>>,
pub min_items: Option<u64>,
pub unique_items: Option<bool>,
pub min_length: Option<u64>,
pub required: Option<Vec<String>>,
}Expand description
Property definition within a Schema.
Similar to Schema but simplified for use as object properties.
Fields§
§reference: Option<String>Reference to another schema definition.
description: Option<String>Description of the property. CommonMark syntax may be used.
all_of: Option<Vec<Box<SchemaProperty>>>Composition of schemas using allOf.
kind: Option<SchemaType>The data type of the property.
minimum: Option<u64>Minimum value for numeric types.
items: Option<Box<Schema>>Schema for items if this property is an array.
min_items: Option<u64>Minimum number of items if this property is an array.
unique_items: Option<bool>Whether array items must be unique.
min_length: Option<u64>Minimum length for string types.
required: Option<Vec<String>>List of required nested property names.
Trait Implementations§
Source§impl Clone for SchemaProperty
impl Clone for SchemaProperty
Source§fn clone(&self) -> SchemaProperty
fn clone(&self) -> SchemaProperty
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SchemaProperty
impl Debug for SchemaProperty
Source§impl<'de> Deserialize<'de> for SchemaProperty
impl<'de> Deserialize<'de> for SchemaProperty
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 SchemaProperty
impl RefUnwindSafe for SchemaProperty
impl Send for SchemaProperty
impl Sync for SchemaProperty
impl Unpin for SchemaProperty
impl UnsafeUnpin for SchemaProperty
impl UnwindSafe for SchemaProperty
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