Enum rweb::openapi::MediaTypeExample [−][src]
pub enum MediaTypeExample {
Example {
example: Value,
},
Examples {
examples: IndexMap<Cow<'static, str>, ObjectOrReference<Example>, RandomState>,
},
}
Variants
Example of the media type. The example object SHOULD be in the correct format as
specified by the media type. The example
field is mutually exclusive of the
examples
field. Furthermore, if referencing a schema
which contains an example,
the example
value SHALL override the example provided by the schema.
Fields of Example
example: Value
Examples of the media type. Each example object SHOULD match the media type and
specified schema if present. The examples
field is mutually exclusive of
the example
field. Furthermore, if referencing a schema
which contains an
example, the examples
value SHALL override the example provided by the schema.
Fields of Examples
examples: IndexMap<Cow<'static, str>, ObjectOrReference<Example>, RandomState>
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<MediaTypeExample, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<MediaTypeExample, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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 MediaTypeExample
impl Send for MediaTypeExample
impl Sync for MediaTypeExample
impl Unpin for MediaTypeExample
impl UnwindSafe for MediaTypeExample
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