Struct rustful::server::ServerInstance [] [src]

pub struct ServerInstance<R> { /* fields omitted */ }

A runnable instance of a server.

It's not meant to be used directly, unless additional control is required.

let server_instance = Server {
    host: 8080.into(),
    handlers: router,
    ..Server::default()
}.build();

Methods

impl<R: HandleRequest + 'static> ServerInstance<R>
[src]

Create a new server instance, with the provided configuration. This is the same as Server{...}.build().

Start the server.

Start the server with SSL.

Trait Implementations

impl<R: HandleRequest + 'static> HyperHandler for ServerInstance<R>
[src]

Receives a Request/Response pair, and should perform some action on them. Read more

This is run after a connection is received, on a per-connection basis (not a per-request basis, as a connection with keep-alive may handle multiple requests) Read more

This is run before a connection is closed, on a per-connection basis (not a per-request basis, as a connection with keep-alive may handle multiple requests) Read more

Called when a Request includes a Expect: 100-continue header. Read more

Auto Trait Implementations

impl<R> Send for ServerInstance<R> where
    R: Send

impl<R> Sync for ServerInstance<R> where
    R: Sync