pub struct Server { /* private fields */ }
Expand description
A more advanced server builder with configuration options
Implementations§
Source§impl Server
impl Server
Sourcepub fn config(self, config: ServerConfig) -> Self
pub fn config(self, config: ServerConfig) -> Self
Set the server configuration
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Set maximum number of concurrent connections
Sourcepub fn request_timeout(self, timeout_secs: u64) -> Self
pub fn request_timeout(self, timeout_secs: u64) -> Self
Set request timeout
Sourcepub fn keep_alive_timeout(self, timeout_secs: u64) -> Self
pub fn keep_alive_timeout(self, timeout_secs: u64) -> Self
Set keep-alive timeout
Sourcepub fn max_body_size(self, size: usize) -> Self
pub fn max_body_size(self, size: usize) -> Self
Set maximum request body size
Auto Trait Implementations§
impl Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
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