#[non_exhaustive]pub struct Http1Options {
pub h09_responses: bool,
pub h1_writev: Option<bool>,
pub h1_max_headers: Option<usize>,
pub h1_read_buf_exact_size: Option<usize>,
pub h1_max_buf_size: Option<usize>,
pub ignore_invalid_headers_in_responses: bool,
pub allow_spaces_after_header_name_in_responses: bool,
pub allow_obsolete_multiline_headers_in_responses: bool,
}Expand description
Options for tweaking HTTP/1 connection behavior.
Use Http1Options to adjust how HTTP/1 connections work—things like allowing HTTP/0.9
responses, controlling header handling, buffer sizes, and more. Most settings are optional and
have reasonable defaults.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.h09_responses: boolEnable support for HTTP/0.9 responses.
h1_writev: Option<bool>Whether to use vectored writes for HTTP/1 connections.
h1_max_headers: Option<usize>Maximum number of headers allowed in HTTP/1 responses.
h1_read_buf_exact_size: Option<usize>Exact size of the read buffer to use for HTTP/1 connections.
h1_max_buf_size: Option<usize>Maximum buffer size for HTTP/1 connections.
ignore_invalid_headers_in_responses: boolWhether to ignore invalid headers in HTTP/1 responses.
allow_spaces_after_header_name_in_responses: boolWhether to allow spaces after header names in HTTP/1 responses.
allow_obsolete_multiline_headers_in_responses: boolWhether to allow obsolete multiline headers in HTTP/1 responses.
Implementations§
Source§impl Http1Options
impl Http1Options
Sourcepub fn builder() -> Http1OptionsBuilder
pub fn builder() -> Http1OptionsBuilder
Create a new Http1OptionsBuilder.
Trait Implementations§
Source§impl Clone for Http1Options
impl Clone for Http1Options
Source§fn clone(&self) -> Http1Options
fn clone(&self) -> Http1Options
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 Http1Options
impl Debug for Http1Options
Source§impl Default for Http1Options
impl Default for Http1Options
Source§fn default() -> Http1Options
fn default() -> Http1Options
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Http1Options
impl RefUnwindSafe for Http1Options
impl Send for Http1Options
impl Sync for Http1Options
impl Unpin for Http1Options
impl UnsafeUnpin for Http1Options
impl UnwindSafe for Http1Options
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