Struct pemmican::Pemmican [] [src]

pub struct Pemmican<S: Send + Sync, E> {
    pub config: Config,
    pub shared: Arc<Shared<S>>,
    // some fields omitted
}

A Pemmican server instance.

Fields

Methods

impl<S: Send + Sync + 'static, E: Send + Sync + StdError + 'static> Pemmican<S, E>
[src]

Create a new pemmican server instance

Add a route to the server. Routes map a path and method onto a handler. Currently, all routes must be defined and added prior to running the server.

Plug in a plugin. Currently we have not yet implemented methods to order or re-order these.

Run the server. It will run until the shutdown_signal future completes. You can use futures::future::empty() to run forever.

Trait Implementations

impl<S: Send + Sync + Default + 'static, E: Send + Sync + StdError + 'static> Default for Pemmican<S, E>
[src]

Returns the "default value" for a type. Read more

impl<S: Send + Sync + 'static, E: Send + Sync + StdError + 'static> Service for Pemmican<S, E>
[src]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

Process the request and return the response asynchronously.