Struct monto::service::Service
[−]
[src]
pub struct Service { /* fields omitted */ }
A Service and the associated HTTP server.
Methods
impl Service
[src]
fn serve_until<F: Future>(self, stop: F) -> ServeFuture<F>
Serves until the given future resolves.
fn serve_forever(self) -> ServeFuture<Empty<Void, Void>>
Serves forever.
impl Service
[src]
fn new(config: Config, handle: Handle) -> Service
Creates a new Service.
fn negotiation(&self) -> ServiceNegotiation
Creates a ServiceNegotiation.
fn add_provider<P: ServiceProvider + 'static>(&mut self, provider: P)
Adds a ServiceProvider to the service.
Replaces any ServiceProvider that provides the same Product.