pub struct HeaderParam {
pub name: RustIdent,
pub header_name: String,
pub ty: RustType,
pub required: bool,
pub doc: Option<String>,
}Expand description
A single header parameter within a Headers struct.
Fields§
§name: RustIdentRust field identifier (snake_case).
header_name: StringThe exact OpenAPI header name, used for the case-insensitive lookup in
the generated extractor (for example X-Request-Id).
ty: RustTypeThe parsed scalar type. Unlike Field, this is the bare element type
even when the header is optional. The emitter adds the Option<..>
wrapper for absent headers.
required: boolWhether the header is required. A missing required header is a 400.
doc: Option<String>Doc comment derived from the parameter description.
Trait Implementations§
Source§impl Clone for HeaderParam
impl Clone for HeaderParam
Source§fn clone(&self) -> HeaderParam
fn clone(&self) -> HeaderParam
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 HeaderParam
impl Debug for HeaderParam
Source§impl PartialEq for HeaderParam
impl PartialEq for HeaderParam
impl StructuralPartialEq for HeaderParam
Auto Trait Implementations§
impl Freeze for HeaderParam
impl RefUnwindSafe for HeaderParam
impl Send for HeaderParam
impl Sync for HeaderParam
impl Unpin for HeaderParam
impl UnsafeUnpin for HeaderParam
impl UnwindSafe for HeaderParam
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