pub struct ServeOptions {
pub max_connections: Option<usize>,
pub shutdown_timeout: Duration,
pub header_read_timeout: Duration,
pub tcp_nodelay: bool,
pub connect_info: bool,
}Expand description
Connection-level options, usually derived from a ServerConfig.
Fields§
§max_connections: Option<usize>Maximum number of open connections (None = unlimited).
shutdown_timeout: DurationHow long to wait for in-flight connections during shutdown.
header_read_timeout: DurationMaximum time to receive request headers on HTTP/1 connections
(Duration::ZERO disables the timeout).
tcp_nodelay: boolSet TCP_NODELAY on accepted sockets.
connect_info: boolInsert ConnectInfo<SocketAddr> into each request.
Trait Implementations§
Source§impl Clone for ServeOptions
impl Clone for ServeOptions
Source§impl Debug for ServeOptions
impl Debug for ServeOptions
Source§impl Default for ServeOptions
impl Default for ServeOptions
Source§impl From<&ServerConfig> for ServeOptions
impl From<&ServerConfig> for ServeOptions
Source§fn from(config: &ServerConfig) -> Self
fn from(config: &ServerConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for ServeOptions
impl Freeze for ServeOptions
impl RefUnwindSafe for ServeOptions
impl Send for ServeOptions
impl Sync for ServeOptions
impl Unpin for ServeOptions
impl UnsafeUnpin for ServeOptions
impl UnwindSafe for ServeOptions
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