Struct poem::Server [−][src]
pub struct Server<L, A> { /* fields omitted */ }
Expand description
An HTTP Server.
Implementations
Use the specified acceptor to create an HTTP server.
Specify the name of the server, it is only used for logs.
Run this server.
pub async fn run_with_graceful_shutdown<E>(
self,
ep: E,
signal: impl Future<Output = ()>,
timeout: Option<Duration>
) -> IoResult<()> where
E: IntoEndpoint,
E::Endpoint: 'static,
pub async fn run_with_graceful_shutdown<E>(
self,
ep: E,
signal: impl Future<Output = ()>,
timeout: Option<Duration>
) -> IoResult<()> where
E: IntoEndpoint,
E::Endpoint: 'static,
Run this server and a signal to initiate graceful shutdown.
Auto Trait Implementations
impl<L, A> RefUnwindSafe for Server<L, A> where
A: RefUnwindSafe,
L: RefUnwindSafe,
impl<L, A> UnwindSafe for Server<L, A> where
A: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more