Struct rweb::openapi::MediaType [−][src]
pub struct MediaType {
pub schema: Option<ComponentOrInlineSchema>,
pub examples: Option<MediaTypeExample>,
pub encoding: IndexMap<Cow<'static, str>, Encoding, RandomState>,
}
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<ComponentOrInlineSchema>
The schema defining the type used for the request body.
examples: Option<MediaTypeExample>
Example of the media type.
encoding: IndexMap<Cow<'static, str>, Encoding, RandomState>
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
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<MediaType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<MediaType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for MediaType
impl UnwindSafe for MediaType
Blanket Implementations
Mutably borrows from an owned value. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
type Output = T
type Output = T
Should always be Self