Expand description
Is super type for OpenAPI Schema Object. Schema is reusable resource what can be
referenced from path operations and other components using Ref
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Object(Object)
Defines object schema. Object is either object
hodling properties which are other Schema
s
or can be a field within the Object
.
Array(Array)
Defines array schema from another schema. Typically used with
Schema::Object
. Slice and Vec types are translated to Schema::Array
types.
OneOf(OneOf)
Creates a OneOf type Discriminator Object schema. This schema
is used to map multiple schemas together where API endpoint could return any of them.
Schema::OneOf
is created form complex enum where enum holds other than unit types.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
sourcefn 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
sourceimpl From<ArrayBuilder> for Schema
impl From<ArrayBuilder> for Schema
sourcefn from(builder: ArrayBuilder) -> Self
fn from(builder: ArrayBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<ObjectBuilder> for Schema
impl From<ObjectBuilder> for Schema
sourcefn from(builder: ObjectBuilder) -> Self
fn from(builder: ObjectBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<OneOfBuilder> for Schema
impl From<OneOfBuilder> for Schema
sourcefn from(builder: OneOfBuilder) -> Self
fn from(builder: OneOfBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more