Enum rweb::openapi::ParameterExamples [−][src]
pub enum ParameterExamples { One { example: Option<Value>, }, Multiple { examples: IndexMap<Cow<'static, str>, ObjectOrReference<Example>, RandomState>, }, }
Expand description
Example(s) of the parameter’s potential value
Variants
Show fields
Fields of One
example: Option<Value>
Example of the parameter’s potential value.
The example SHOULD match the specified schema and encoding properties if present.
The example
field is mutually exclusive of the examples
field. Furthermore, if referencing a schema
that contains an example, the example
value SHALL override the example provided by the schema.
To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.
Show fields
Fields of Multiple
examples: IndexMap<Cow<'static, str>, ObjectOrReference<Example>, RandomState>
Examples of the parameter’s potential value.
Each example SHOULD contain a value in the correct format as specified in the parameter encoding.
The examples
field is mutually exclusive of the example
field.
Furthermore, if referencing a schema
that contains an example, the examples
value SHALL override the example provided by the schema.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ParameterExamples, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ParameterExamples, <__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 ParameterExamples
impl Send for ParameterExamples
impl Sync for ParameterExamples
impl Unpin for ParameterExamples
impl UnwindSafe for ParameterExamples
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;
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;
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;
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;
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V