pub struct ResponseCase {
pub variant: RustIdent,
pub status: ResponseStatus,
pub body: Option<ResponseBody>,
pub headers: Vec<ResponseHeader>,
pub doc: Option<String>,
}Expand description
One arm of an operation’s response enum.
Fields§
§variant: RustIdentVariant identifier, named after the status reason phrase (fixed codes),
the response-range class, or Default.
status: ResponseStatusHow the variant’s HTTP status code is determined.
body: Option<ResponseBody>Response body (a single supported content type, or a set of content types the handler chooses among), when the response declares supported content.
headers: Vec<ResponseHeader>Declared response headers written by the generated IntoResponse, in
declaration order. Empty means no headers (the pre-C5 variant shape).
doc: Option<String>Doc comment derived from the response description.
Trait Implementations§
Source§impl Clone for ResponseCase
impl Clone for ResponseCase
Source§fn clone(&self) -> ResponseCase
fn clone(&self) -> ResponseCase
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 ResponseCase
impl Debug for ResponseCase
Source§impl PartialEq for ResponseCase
impl PartialEq for ResponseCase
impl StructuralPartialEq for ResponseCase
Auto Trait Implementations§
impl Freeze for ResponseCase
impl RefUnwindSafe for ResponseCase
impl Send for ResponseCase
impl Sync for ResponseCase
impl Unpin for ResponseCase
impl UnsafeUnpin for ResponseCase
impl UnwindSafe for ResponseCase
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