Skip to main content

ObjectSchema

Struct ObjectSchema 

Source
pub struct ObjectSchema {
Show 35 fields pub all_of: Vec<ObjectOrReference<ObjectSchema>>, pub any_of: Vec<ObjectOrReference<ObjectSchema>>, pub one_of: Vec<ObjectOrReference<ObjectSchema>>, pub items: Option<Box<Schema>>, pub prefix_items: Vec<ObjectOrReference<ObjectSchema>>, pub properties: BTreeMap<String, ObjectOrReference<ObjectSchema>>, pub additional_properties: Option<Schema>, pub schema_type: Option<TypeSet>, pub enum_values: Vec<Value>, pub const_value: Option<Value>, pub multiple_of: Option<Number>, pub maximum: Option<Number>, pub exclusive_maximum: Option<Number>, pub minimum: Option<Number>, pub exclusive_minimum: Option<Number>, pub max_length: Option<u64>, pub min_length: Option<u64>, pub pattern: Option<String>, pub max_items: Option<u64>, pub min_items: Option<u64>, pub unique_items: Option<bool>, pub max_properties: Option<u64>, pub min_properties: Option<u64>, pub required: Vec<String>, pub format: Option<String>, pub title: Option<String>, pub description: Option<String>, pub default: Option<Value>, pub deprecated: Option<bool>, pub read_only: Option<bool>, pub write_only: Option<bool>, pub examples: Vec<Value>, pub discriminator: Option<Discriminator>, pub example: Option<Value>, pub extensions: BTreeMap<String, Value>,
}
Expand description

A schema object allows the definition of input and output data types.

Fields§

§all_of: Vec<ObjectOrReference<ObjectSchema>>§any_of: Vec<ObjectOrReference<ObjectSchema>>§one_of: Vec<ObjectOrReference<ObjectSchema>>§items: Option<Box<Schema>>§prefix_items: Vec<ObjectOrReference<ObjectSchema>>§properties: BTreeMap<String, ObjectOrReference<ObjectSchema>>§additional_properties: Option<Schema>§schema_type: Option<TypeSet>§enum_values: Vec<Value>§const_value: Option<Value>§multiple_of: Option<Number>§maximum: Option<Number>§exclusive_maximum: Option<Number>§minimum: Option<Number>§exclusive_minimum: Option<Number>§max_length: Option<u64>§min_length: Option<u64>§pattern: Option<String>§max_items: Option<u64>§min_items: Option<u64>§unique_items: Option<bool>§max_properties: Option<u64>§min_properties: Option<u64>§required: Vec<String>§format: Option<String>§title: Option<String>§description: Option<String>§default: Option<Value>§deprecated: Option<bool>§read_only: Option<bool>§write_only: Option<bool>§examples: Vec<Value>§discriminator: Option<Discriminator>§example: Option<Value>§extensions: BTreeMap<String, Value>

Implementations§

Source§

impl ObjectSchema

Source

pub fn is_nullable(&self) -> Option<bool>

Returns true if Null appears in set of schema types, or None if unspecified.

Trait Implementations§

Source§

impl Clone for ObjectSchema

Source§

fn clone(&self) -> ObjectSchema

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObjectSchema

Source§

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

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

impl Default for ObjectSchema

Source§

fn default() -> ObjectSchema

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ObjectSchema

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 FromRef for ObjectSchema

Source§

fn from_ref(spec: &OpenApiV31Spec, path: &str) -> Result<Self, ErrorRef>

Finds an object in spec using the given path.
Source§

impl PartialEq for ObjectSchema

Source§

fn eq(&self, other: &ObjectSchema) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ObjectSchema

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
Source§

impl StructuralPartialEq for ObjectSchema

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,