Struct Schema

Source
pub struct Schema {
Show 33 fields pub title: Option<String>, pub multiple_of: Option<f64>, pub maximum: Option<f64>, pub exclusive_maximum: Option<bool>, pub minimum: Option<f64>, pub exclusive_minimum: Option<bool>, pub max_length: Option<u32>, pub min_length: Option<u32>, pub pattern: Option<String>, pub max_items: Option<u32>, pub min_items: Option<u32>, pub unique_items: Option<bool>, pub max_properties: Option<u32>, pub min_properties: Option<u32>, pub required: Option<Vec<String>>, pub type_: Option<String>, pub not: Option<Box<Schema>>, pub all_of: Option<Vec<Schema>>, pub one_of: Option<Vec<Schema>>, pub any_of: Option<Vec<Schema>>, pub items: Option<Box<Schema>>, pub properties: Option<HashMap<String, Schema>>, pub additional_properties: Option<Box<Schema>>, pub description: Option<String>, pub format: Option<String>, pub default: Option<Value>, pub nullable: Option<bool>, pub discriminator: Option<Discriminator>, pub read_only: Option<bool>, pub write_only: Option<bool>, pub xml: Option<XML>, pub example: Option<Value>, pub deprecated: Option<bool>,
}

Fields§

§title: Option<String>§multiple_of: Option<f64>§maximum: Option<f64>§exclusive_maximum: Option<bool>§minimum: Option<f64>§exclusive_minimum: Option<bool>§max_length: Option<u32>§min_length: Option<u32>§pattern: Option<String>§max_items: Option<u32>§min_items: Option<u32>§unique_items: Option<bool>§max_properties: Option<u32>§min_properties: Option<u32>§required: Option<Vec<String>>§type_: Option<String>§not: Option<Box<Schema>>§all_of: Option<Vec<Schema>>§one_of: Option<Vec<Schema>>§any_of: Option<Vec<Schema>>§items: Option<Box<Schema>>§properties: Option<HashMap<String, Schema>>§additional_properties: Option<Box<Schema>>§description: Option<String>§format: Option<String>§default: Option<Value>§nullable: Option<bool>§discriminator: Option<Discriminator>§read_only: Option<bool>§write_only: Option<bool>§xml: Option<XML>§example: Option<Value>§deprecated: Option<bool>

Trait Implementations§

Source§

impl Debug for Schema

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Schema

Source§

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 Serialize for Schema

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Schema

§

impl RefUnwindSafe for Schema

§

impl Send for Schema

§

impl Sync for Schema

§

impl Unpin for Schema

§

impl UnwindSafe for Schema

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,