pub struct BodyContent {
pub media_type: String,
pub type: TypeRef,
pub encoding: Vec<(String, Encoding)>,
pub item_schema: Option<TypeRef>,
pub examples: Vec<(String, Example)>,
pub extensions: Vec<(String, ValueRef)>,
}Fields§
§media_type: String§type: TypeRef§encoding: Vec<(String, Encoding)>§item_schema: Option<TypeRef>OAS 3.2 itemSchema: per-item shape for sequence-of-items
responses (JSON Lines, SSE event-stream, multipart/mixed).
Mutually exclusive with schema in the spec; when present, the
parser populates type with the same ref so generators that
don’t model streaming see a usable type. Streaming-aware
generators read item_schema to know they should decode one
record at a time.
examples: Vec<(String, Example)>OAS example / examples for this media-type entry. Named
entries; 3.0 example: <literal> lands under the synthetic
key "_default".
extensions: Vec<(String, ValueRef)>x-* extensions declared on the media-type object. Compound
extensions drop with parser/W-EXTENSION-DROPPED.
Trait Implementations§
Source§impl Clone for BodyContent
impl Clone for BodyContent
Source§fn clone(&self) -> BodyContent
fn clone(&self) -> BodyContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BodyContent
impl Debug for BodyContent
Source§impl<'de> Deserialize<'de> for BodyContent
impl<'de> Deserialize<'de> for BodyContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BodyContent
impl PartialEq for BodyContent
Source§fn eq(&self, other: &BodyContent) -> bool
fn eq(&self, other: &BodyContent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BodyContent
impl Serialize for BodyContent
impl StructuralPartialEq for BodyContent
Auto Trait Implementations§
impl Freeze for BodyContent
impl RefUnwindSafe for BodyContent
impl Send for BodyContent
impl Sync for BodyContent
impl Unpin for BodyContent
impl UnsafeUnpin for BodyContent
impl UnwindSafe for BodyContent
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