pub struct SimpleHttpServer { /* private fields */ }
Expand description
A simple server that wraps a hyper service and handles requests. The server can be configured to listen for either HTTP and HTTPS, and supports graceful shutdown and x-forwarded-* headers.
Implementations§
Source§impl SimpleHttpServer
impl SimpleHttpServer
pub fn new<S>( service: S, listener: TcpListener, https_config: HttpsConfig, ) -> Result<Self>
pub async fn graceful_shutdown(self)
pub async fn graceful_shutdown_with_timeout(self, timeout: Duration)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimpleHttpServer
impl RefUnwindSafe for SimpleHttpServer
impl Send for SimpleHttpServer
impl Sync for SimpleHttpServer
impl Unpin for SimpleHttpServer
impl UnwindSafe for SimpleHttpServer
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