Struct edge::Container
[−]
[src]
pub struct Container<T: Send + Sync> { /* fields omitted */ }
Container of an application.
Methods
impl<T: 'static + Send + Sync> Container<T>
[src]
fn new(inner: T) -> Container<T>
fn get<S: Into<Route>>(&mut self, path: S, method: Callback<T>)
fn post<S: Into<Route>>(&mut self, path: S, method: Callback<T>)
fn put<S: Into<Route>>(&mut self, path: S, method: Callback<T>)
fn delete<S: Into<Route>>(&mut self, path: S, method: Callback<T>)
fn head<S: Into<Route>>(&mut self, path: S, method: Callback<T>)
fn start(self, addr: &str) -> Result<()>
Trait Implementations
impl<T: 'static + Send + Sync> Handler for Container<T>
[src]
Implements Handler for our Container. Wraps the HTTP request/response in our own types.
fn handle<'a, 'k>(
&'a self,
req: HttpRequest<'a, 'k>,
res: HttpResponse<'a, Fresh>
)
&'a self,
req: HttpRequest<'a, 'k>,
res: HttpResponse<'a, Fresh>
)
Receives a Request
/Response
pair, and should perform some action on them. Read more
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
Called when a Request includes a Expect: 100-continue
header. Read more
fn on_connection_start(&self)
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
fn on_connection_end(&self)
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