pub struct ServerBuilder { /* private fields */ }
Available on crate feature
server
only.Expand description
HTTP server builder.
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub const fn max_concurrent_connections(self, max: u32) -> Self
pub const fn max_concurrent_connections(self, max: u32) -> Self
Set maximum number of concurrent connections.
Sourcepub const fn max_concurrent_requests(self, max: u32) -> Self
pub const fn max_concurrent_requests(self, max: u32) -> Self
Set maximum number of concurrent requests per connection.
Sourcepub const fn read_timeout(self, timeout: Option<Duration>) -> Self
pub const fn read_timeout(self, timeout: Option<Duration>) -> Self
Set connection read timeout.
Sourcepub const fn write_timeout(self, timeout: Option<Duration>) -> Self
pub const fn write_timeout(self, timeout: Option<Duration>) -> Self
Set connection write timeout.
Sourcepub const fn max_line_length(self, max_length: Option<usize>) -> Self
pub const fn max_line_length(self, max_length: Option<usize>) -> Self
Set maximum length of a request header line.
Sourcepub const fn max_header_field_length(self, max_length: Option<usize>) -> Self
pub const fn max_header_field_length(self, max_length: Option<usize>) -> Self
Set maximum length of a request header field.
Sourcepub const fn max_header_fields(self, max_fields: Option<usize>) -> Self
pub const fn max_header_fields(self, max_fields: Option<usize>) -> Self
Set maximum number of request header fields.
Sourcepub const fn request_header_timeout(self, timeout: Option<Duration>) -> Self
pub const fn request_header_timeout(self, timeout: Option<Duration>) -> Self
Set timeout for receiving a complete request header.
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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