#[non_exhaustive]pub struct HttpServerOptions {
pub h2c: bool,
pub allow_connect_method_proxying: bool,
pub keepalive_request_limit: Option<u32>,
/* private fields */
}Expand description
HTTP Server options that control how the server handles some transport types.
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.h2c: boolAllow HTTP/2 for plaintext.
allow_connect_method_proxying: boolAllow proxying CONNECT requests when handling HTTP traffic.
When disabled, CONNECT requests are rejected with 405 by proxy services.
keepalive_request_limit: Option<u32>Maximum number of requests that this connection will handle. This is equivalent to Nginx’s keepalive requests which says:
Closing connections periodically is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests could result in excessive memory usage and not recommended.
Unlike nginx, the default behavior here is no limit.
Trait Implementations§
Source§impl Default for HttpServerOptions
impl Default for HttpServerOptions
Source§fn default() -> HttpServerOptions
fn default() -> HttpServerOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpServerOptions
impl RefUnwindSafe for HttpServerOptions
impl Send for HttpServerOptions
impl Sync for HttpServerOptions
impl Unpin for HttpServerOptions
impl UnsafeUnpin for HttpServerOptions
impl UnwindSafe for HttpServerOptions
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