Struct oasgen_core::Example
source · pub struct Example {
pub summary: Option<String>,
pub description: Option<String>,
pub value: Option<Value>,
pub external_value: Option<String>,
pub extensions: IndexMap<String, Value>,
}Fields§
§summary: Option<String>Short description for the example.
description: Option<String>Long description for the example. CommonMark syntax MAY be used for rich text representation.
value: Option<Value>Embedded literal example. The value field and externalValue
field are mutually exclusive. To represent examples of
media types that cannot naturally represented in JSON or YAML,
use a string value to contain the example, escaping where necessary.
external_value: Option<String>A URL that points to the literal example.
This provides the capability to reference examples that cannot
easily be included in JSON or YAML documents. The value field and
externalValue field are mutually exclusive.
extensions: IndexMap<String, Value>Inline extensions to this object.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Example
impl<'de> Deserialize<'de> for Example
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Example, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Example, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Example
impl Serialize for Example
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
impl StructuralPartialEq for Example
Auto Trait Implementations§
impl Freeze for Example
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnwindSafe for Example
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)