pub struct Response {
pub description: Option<String>,
pub headers: Option<BTreeMap<String, Header>>,
pub content: Option<BTreeMap<String, MediaType>>,
pub links: Option<Value>,
pub reference: Option<String>,
pub extensions: Extensions,
}Expand description
OpenAPI Response Object
Fields§
§description: Option<String>§headers: Option<BTreeMap<String, Header>>§content: Option<BTreeMap<String, MediaType>>§links: Option<Value>§reference: Option<String>§extensions: ExtensionsImplementations§
Source§impl Response
impl Response
Sourcepub fn json_schema(&self) -> Option<&Schema>
pub fn json_schema(&self) -> Option<&Schema>
Get schema for any JSON content type
Prefers the canonical application/json entry, then falls back to
any application/*+json variant (RFC 6839) such as
application/vnd.api+json, application/hal+json, or
application/problem+json.
Sourcepub fn json_content(&self) -> Option<(&str, &Schema)>
pub fn json_content(&self) -> Option<(&str, &Schema)>
Get the preferred JSON-compatible media type and its schema.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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