Struct edge::Edge
[−]
[src]
pub struct Edge<T: Send + Sync> { // some fields omitted }
Structure for an Edge application.
Methods
impl<T: 'static + Send + Sync> Edge<T>
fn new(inner: T) -> Edge<T>
Creates an Edge application using the given inner structure.
fn get(&mut self, path: &str, callback: Callback<T>)
Registers a callback for the given path for GET requests.
fn post(&mut self, path: &str, callback: Callback<T>)
Registers a callback for the given path for POST requests.
fn put(&mut self, path: &str, callback: Callback<T>)
Registers a callback for the given path for PUT requests.
fn delete(&mut self, path: &str, callback: Callback<T>)
Registers a callback for the given path for DELETE requests.
fn head(&mut self, path: &str, callback: Callback<T>)
Registers a callback for the given path for HEAD requests.
fn insert(&mut self, method: Method, path: &str, callback: Callback<T>)
Inserts the given callback for the given method and given route.
fn start(self, addr: &str) -> Result<()>
Starts a server.