Struct jsona_openapi::MediaType
source · [−]pub struct MediaType {
pub schema: Option<Schema>,
pub examples: Option<OneOrMultiExample>,
pub encoding: Option<IndexMap<String, Encoding>>,
}
Expand description
Each Media Type Object provides schema and examples for the media type identified by its key.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#media-type-object.
Fields
schema: Option<Schema>
The schema defining the type used for the request body.
examples: Option<OneOrMultiExample>
Example of the media type.
encoding: Option<IndexMap<String, Encoding>>
A map between a property name and its encoding information. The key, being the
property name, MUST exist in the schema as a property. The encoding object SHALL
only apply to requestBody
objects when the media type is multipart
or application/x-www-form-urlencoded
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for MediaType
impl<'de> Deserialize<'de> for MediaType
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 PartialEq<MediaType> for MediaType
impl PartialEq<MediaType> for MediaType
impl StructuralPartialEq for MediaType
Auto Trait Implementations
impl RefUnwindSafe for MediaType
impl Send for MediaType
impl Sync for MediaType
impl Unpin for MediaType
impl UnwindSafe for MediaType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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