Function coap_handler_implementations::new_dispatcher[][src]

pub fn new_dispatcher() -> NeverFound
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"], SimpleRendered::new_typed_str("Demo program", Some(0)))
    .at(&["dev", "version"], SimpleRendered::new_typed_str("0.8.15", Some(0)))
    ;