#[non_exhaustive]pub struct HyperCfg {
pub http1_keepalive: bool,
pub http1_half_close: bool,
pub http1_max_buf_size: Option<usize>,
pub http2_initial_stream_window_size: Option<u32>,
pub http2_initial_connection_window_size: Option<u32>,
pub http2_adaptive_window: bool,
pub http2_max_concurrent_streams: Option<u32>,
pub http2_max_frame_size: Option<u32>,
pub http2_keep_alive_interval: Option<Duration>,
pub http2_keep_alive_timeout: Duration,
pub http_mode: HttpMode,
}Expand description
Configuration of Hyper HTTP servers.
This are the things that are extra over the transport. It doesn’t contain any kind of ports or
SSL certificates, these are added inside the HyperServer. This is only for configuring the
HTTP protocol itself.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.http1_keepalive: boolThe HTTP keepalive.
https://en.wikipedia.org/wiki/HTTP_persistent_connection.
Default is on, can be turned off.
http1_half_close: boolWhen a http1 client closes its write end, keep the connection open until the reply is sent.
If set to false, if the client closes its connection, server does too.
http1_max_buf_size: Option<usize>Maximum buffer size of HTTP1.
http2_initial_stream_window_size: Option<u32>Initial window size.
http2_initial_connection_window_size: Option<u32>Initial window size.
http2_adaptive_window: boolChoose the window sizes dynamically at runtime.
If turned off (the default), uses the values configured.
http2_max_concurrent_streams: Option<u32>Maximum number of concurrent streams.
Defaults to no limit.
http2_max_frame_size: Option<u32>The maximum frame size of http2.
http2_keep_alive_interval: Option<Duration>How often to send keep alive/ping frames.
Defaults to disabled.
http2_keep_alive_timeout: DurationClose connection if no response for ping in this time.
Defaults to 20s.
http_mode: HttpModeWhat protocols are enabled.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HyperCfg
impl<'de> Deserialize<'de> for HyperCfg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for HyperCfg
impl Ord for HyperCfg
Source§impl PartialOrd for HyperCfg
impl PartialOrd for HyperCfg
Source§impl StructDoc for HyperCfg
impl StructDoc for HyperCfg
Source§fn document() -> Documentation
fn document() -> Documentation
impl Eq for HyperCfg
impl StructuralPartialEq for HyperCfg
Auto Trait Implementations§
impl Freeze for HyperCfg
impl RefUnwindSafe for HyperCfg
impl Send for HyperCfg
impl Sync for HyperCfg
impl Unpin for HyperCfg
impl UnwindSafe for HyperCfg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.