pub struct HttpServer {
pub name: String,
pub max_headers_size: u64,
pub service: Box<dyn HttpServiceRaw>,
pub error_handler: Box<dyn HttpErrorHandler>,
pub logger: Box<dyn HttpLogger>,
}Expand description
An HTTP/1.1 server
Fields§
§name: String§max_headers_size: u64§service: Box<dyn HttpServiceRaw>§error_handler: Box<dyn HttpErrorHandler>§logger: Box<dyn HttpLogger>Implementations§
Source§impl HttpServer
impl HttpServer
pub fn new() -> HttpServer
pub fn service(&mut self, service: impl HttpService) -> &mut Self
pub fn error_handler( &mut self, error_handler: impl HttpErrorHandler, ) -> &mut Self
pub fn logger(&mut self, logger: impl HttpLogger) -> &mut Self
Trait Implementations§
Source§impl Default for HttpServer
impl Default for HttpServer
Source§fn default() -> HttpServer
fn default() -> HttpServer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpServer
impl !RefUnwindSafe for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl !UnwindSafe for HttpServer
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