Struct pemmican::Pemmican
[−]
[src]
pub struct Pemmican<S: Send + Sync + 'static, E: StdError + Send + Sync + 'static> { pub pool: CpuPool, pub state: S, // some fields omitted }
Fields
pool: CpuPool
state: S
Methods
impl<S: Send + Sync + 'static, E: StdError + Send + Sync + 'static> Pemmican<S, E>
[src]
fn new(config: Config, initial_state: S) -> Pemmican<S, E>
fn add_route(&mut self, path: &str, method: Method, handler: Handler<S, E>)
fn run<F>(self, addr: &str, shutdown_signal: F) -> Result<(), Error> where
F: Future<Item = (), Error = ()>,
F: Future<Item = (), Error = ()>,
Trait Implementations
impl<S: Send + Sync + 'static + Default, E: StdError + Send + Sync + 'static> Default for Pemmican<S, E>
[src]
impl<S: Send + Sync + 'static, E: StdError + Send + Sync + 'static> Service for Pemmican<S, E>
[src]
type Request = Request
Requests handled by the service.
type Response = Response
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = Box<Future<Item = Self::Response, Error = Self::Error>>
The future response value.
fn call(&self, req: Request) -> Self::Future
Process the request and return the response asynchronously.