Struct finchers::service::ServerBuilder
[−]
[src]
pub struct ServerBuilder { /* fields omitted */ }
The factory of HTTP service
Methods
impl ServerBuilder
[src]
fn bind<S: ToSocketAddrs>(self, addr: S) -> Self
[src]
Set the listener address of the service
fn num_workers(self, n: usize) -> Self
[src]
Set the number of worker threads
fn proto(self, proto: Http<Chunk>) -> Self
[src]
Set the "raw" HTTP protocol
fn secret_key<K: Into<Vec<u8>>>(self, key: K) -> Self
[src]
Set the secret key used by CookieManager
.
fn serve<E>(self, endpoint: E) where
E: Endpoint + Clone + Send + Sync + 'static,
E::Item: IntoResponder,
E::Error: IntoResponder + From<NoRoute>,
[src]
E: Endpoint + Clone + Send + Sync + 'static,
E::Item: IntoResponder,
E::Error: IntoResponder + From<NoRoute>,
Start an HTTP server with given endpoint