pub struct ServerBuilder { /* private fields */ }Expand description
Builder for constructing a Server with custom options.
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn with_addr(self, addr: impl Into<String>) -> Self
pub fn with_addr(self, addr: impl Into<String>) -> Self
Override the bind address used by the server.
Sourcepub fn with_handler<H>(self, handler: H) -> Selfwhere
H: Handler,
pub fn with_handler<H>(self, handler: H) -> Selfwhere
H: Handler,
Provide a custom request handler implementation.
Sourcepub fn with_header_read_timeout(self, timeout: Duration) -> Self
pub fn with_header_read_timeout(self, timeout: Duration) -> Self
Override the timeout used when reading request headers.
Sourcepub fn with_body_read_timeout(self, timeout: Duration) -> Self
pub fn with_body_read_timeout(self, timeout: Duration) -> Self
Override the timeout applied when draining request bodies.
Sourcepub fn with_idle_timeout(self, timeout: Duration) -> Self
pub fn with_idle_timeout(self, timeout: Duration) -> Self
Override the idle timeout between pipelined requests.
Sourcepub fn with_connection_config(self, config: ConnectionConfig) -> Self
pub fn with_connection_config(self, config: ConnectionConfig) -> Self
Provide a fully-specified connection configuration.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerBuilder
impl !UnwindSafe for ServerBuilder
impl Freeze for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnsafeUnpin 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