Function coap_handler::implementations::new_dispatcher
source · [−]pub fn new_dispatcher() -> NeverFound👎 Deprecated
Expand description
Start building a tree of sub-resources
While technically this just returns a handler that returns 4.04 unconditionally, it also implemnts HandlerBuilder, and thus can be used like this:
use coap_handler::implementations::*;
let handler = new_dispatcher()
.at(&["dev", "name"], TypedStaticResponse::from("Demo program"))
.at(&["dev", "version"], TypedStaticResponse::from("0.8.15"))
;