pub struct ResponseHeader {
pub name: RustIdent,
pub header_name: String,
pub ty: RustType,
pub required: bool,
pub doc: Option<String>,
}Expand description
A single declared response header written by the generated IntoResponse.
Fields§
§name: RustIdentRust field identifier (snake_case).
header_name: StringExact header name as written to the response (for example X-Request-Id).
ty: RustTypeScalar type serialized to a header value via ToString. Bare element
type even when optional. The emitter adds the Option<..> wrapper.
required: boolWhether the header is always written (false → Option<..> field).
doc: Option<String>Doc comment derived from the header description.
Trait Implementations§
Source§impl Clone for ResponseHeader
impl Clone for ResponseHeader
Source§fn clone(&self) -> ResponseHeader
fn clone(&self) -> ResponseHeader
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 ResponseHeader
impl Debug for ResponseHeader
Source§impl PartialEq for ResponseHeader
impl PartialEq for ResponseHeader
impl StructuralPartialEq for ResponseHeader
Auto Trait Implementations§
impl Freeze for ResponseHeader
impl RefUnwindSafe for ResponseHeader
impl Send for ResponseHeader
impl Sync for ResponseHeader
impl Unpin for ResponseHeader
impl UnsafeUnpin for ResponseHeader
impl UnwindSafe for ResponseHeader
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