pub struct Responses {
pub default: Option<Referenceable<Response>>,
pub data: BTreeMap<String, Referenceable<Response>>,
}Expand description
A container for the expected responses of an operation.
Fields§
§default: Option<Referenceable<Response>>The documentation of responses other than the ones declared for specific HTTP response codes.
data: BTreeMap<String, Referenceable<Response>>Implementations§
Source§impl Responses
impl Responses
pub fn new() -> Self
pub fn with_status( self, status: impl Into<String>, response: Referenceable<Response>, ) -> Self
pub fn with_default(self, response: Referenceable<Response>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Responses
impl<'de> Deserialize<'de> for Responses
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 Responses
impl RefUnwindSafe for Responses
impl Send for Responses
impl Sync for Responses
impl Unpin for Responses
impl UnsafeUnpin for Responses
impl UnwindSafe for Responses
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