pub enum Examples {
Inline(Value),
Named(Map<RefOr<Example>>),
}Expand description
The examples an object shows its value with, in whichever form it uses.
A Parameter, Header or Media Type Object may carry one inline example or a
map of named examples, and the specification makes the two mutually
exclusive. An enum rather than two Option fields, for the reason
SecurityScheme is one: an
unusable combination that cannot be spelled needs no rule to reject it.
Note that the singular form is not an Example: example is the value
itself, written inline, while examples maps names to Example Objects that
can also carry a summary, a description or an external payload.
Variants§
Inline(Value)
One example of the value, written to example.
Named(Map<RefOr<Example>>)
Named examples, written to examples.
Each is an Example or a reference to one in
Components::examples.
Trait Implementations§
impl StructuralPartialEq for Examples
Auto Trait Implementations§
impl Freeze for Examples
impl RefUnwindSafe for Examples
impl Send for Examples
impl Sync for Examples
impl Unpin for Examples
impl UnsafeUnpin for Examples
impl UnwindSafe for Examples
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more