Struct spirit_hyper::HyperCfg[][src]

#[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,
}

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)

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.
http1_keepalive: bool

The HTTP keepalive.

https://en.wikipedia.org/wiki/HTTP_persistent_connection.

Default is on, can be turned off.

http1_half_close: bool

When 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: bool

Choose 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: Duration

Close connection if no response for ping in this time.

Defaults to 20s.

http_mode: HttpMode

What protocols are enabled.

Implementations

impl HyperCfg[src]

pub fn builder<I>(&self, incoming: I) -> Builder<I>[src]

Constructs a Hyper server Builder based on this configuration.

Trait Implementations

impl Clone for HyperCfg[src]

impl Debug for HyperCfg[src]

impl Default for HyperCfg[src]

impl<'de> Deserialize<'de> for HyperCfg where
    HyperCfg: Default
[src]

impl Eq for HyperCfg[src]

impl Hash for HyperCfg[src]

impl Ord for HyperCfg[src]

impl PartialEq<HyperCfg> for HyperCfg[src]

impl PartialOrd<HyperCfg> for HyperCfg[src]

impl Serialize for HyperCfg[src]

impl StructDoc for HyperCfg[src]

impl StructuralEq for HyperCfg[src]

impl StructuralPartialEq for HyperCfg[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.