Struct webmachine_rust::WebmachineDispatcher [] [src]

pub struct WebmachineDispatcher {
    pub routes: Mutex<BTreeMap<String, Arc<WebmachineResource>>>,
}

The main hyper dispatcher

Fields

Map of routes to webmachine resources

Methods

impl WebmachineDispatcher
[src]

Create a new Webmachine dispatcher given a map of routes to webmachine resources

Main hyper dispatch function for the Webmachine. This will look for a matching resource based on the request path. If one is not found, a 404 Not Found response is returned

Dispatches to the matching webmachine resource. If there is no matching resource, returns 404 Not Found response