Struct hyperap::server::Hyperap
[−]
[src]
pub struct Hyperap<D> where
D: HyperapCore + 'static, { /* fields omitted */ }
Methods
impl<D> Hyperap<D> where
D: HyperapCore + 'static,
[src]
D: HyperapCore + 'static,
fn new(d: D) -> Hyperap<D>
[src]
fn add_route<F: 'static, S: Into<String>>(
&mut self,
method: Method,
path: S,
func: F,
definition: D::R
) -> &mut Self where
F: Fn(D::M) -> D::Resp,
[src]
&mut self,
method: Method,
path: S,
func: F,
definition: D::R
) -> &mut Self where
F: Fn(D::M) -> D::Resp,
fn add_pure_route<F: 'static, S: Into<String>>(
&mut self,
method: Method,
path: S,
func: F
) -> &mut Self where
F: Fn(D::M) -> D::Resp,
[src]
&mut self,
method: Method,
path: S,
func: F
) -> &mut Self where
F: Fn(D::M) -> D::Resp,
fn production(&mut self) -> &mut Self
[src]
fn open_browser(&mut self, b: bool) -> &mut Self
[src]
fn port(&mut self, port: u16) -> &mut Self
[src]
fn run(self)
[src]
Trait Implementations
impl<D> Service for Hyperap<D> where
D: HyperapCore + 'static,
[src]
D: HyperapCore + 'static,
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
[src]
Process the request and return the response asynchronously.