pub struct ServerOptions { /* private fields */ }
Expand description
Configure the server.
Implementations§
Source§impl ServerOptions
impl ServerOptions
Sourcepub fn with_headers_timeout(self, headers_timeout: Duration) -> Self
pub fn with_headers_timeout(self, headers_timeout: Duration) -> Self
sets the timeout by which the headers must have been received
Sourcepub fn with_default_host(self, default_host: &str) -> Self
pub fn with_default_host(self, default_host: &str) -> Self
Sets the default http 1.0 host for this server. If no host header is provided on an http/1.0 request, this host will be used to construct the Request Url.
If this is not provided, the server will respond to all
http/1.0 requests with status 505 http version not supported
, whether or not a host header is provided.
The default value for this is None, and as a result async-h1 is by default an http-1.1-only server.
Trait Implementations§
Source§impl Clone for ServerOptions
impl Clone for ServerOptions
Source§fn clone(&self) -> ServerOptions
fn clone(&self) -> ServerOptions
Returns a copy of the value. Read more
1.0.0 · 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 ServerOptions
impl Debug for ServerOptions
Auto Trait Implementations§
impl Freeze for ServerOptions
impl RefUnwindSafe for ServerOptions
impl Send for ServerOptions
impl Sync for ServerOptions
impl Unpin for ServerOptions
impl UnwindSafe for ServerOptions
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