Struct warp::Server [−][src]
pub struct Server<S> { /* fields omitted */ }
A Warp Server ready to filter requests.
Methods
impl<S> Server<S> where
S: IntoWarpService + 'static,
<<S::Service as WarpService>::Reply as Future>::Item: Reply + Send,
<<S::Service as WarpService>::Reply as Future>::Error: Reject + Send,
[src]
impl<S> Server<S> where
S: IntoWarpService + 'static,
<<S::Service as WarpService>::Reply as Future>::Item: Reply + Send,
<<S::Service as WarpService>::Reply as Future>::Error: Reject + Send,
pub fn run(
self,
addr: impl Into<SocketAddr> + 'static
)
[src]
pub fn run(
self,
addr: impl Into<SocketAddr> + 'static
)
Run this Server
forever on the current thread.
pub fn bind(
self,
addr: impl Into<SocketAddr> + 'static
) -> impl Future<Item = (), Error = ()> + 'static
[src]
pub fn bind(
self,
addr: impl Into<SocketAddr> + 'static
) -> impl Future<Item = (), Error = ()> + 'static
Bind to a socket address, returning a Future
that can be
executed on any runtime.
pub fn bind_ephemeral(
self,
addr: impl Into<SocketAddr> + 'static
) -> (SocketAddr, impl Future<Item = (), Error = ()> + 'static)
[src]
pub fn bind_ephemeral(
self,
addr: impl Into<SocketAddr> + 'static
) -> (SocketAddr, impl Future<Item = (), Error = ()> + 'static)
Bind to a possibly ephemeral socket address.
Returns the bound address and a Future
that can be executed on
any runtime.