Trait coap_handler_implementations::SimpleCBORHandler[][src]

pub trait SimpleCBORHandler {
    type Get: for<'de> Serialize;
    type Post: for<'de> Deserialize<'de>;
    type Put: for<'de> Deserialize<'de>;
    fn get(&mut self) -> Result<Self::Get, u8> { ... }
fn post(&mut self, _representation: &Self::Post) -> u8 { ... }
fn put(&mut self, _representation: &Self::Put) -> u8 { ... } }

A simple Handler trait that supports GET, POST and/or PUT on a data structure that supports serde.

A SimpleCBORHandler implementation can be turned into a Handler by wrapping it in SimpleCBORWrapper::new.

Associated Types

type Get: for<'de> Serialize[src]

type Post: for<'de> Deserialize<'de>[src]

type Put: for<'de> Deserialize<'de>[src]

Loading content...

Provided methods

fn get(&mut self) -> Result<Self::Get, u8>[src]

fn post(&mut self, _representation: &Self::Post) -> u8[src]

fn put(&mut self, _representation: &Self::Put) -> u8[src]

Loading content...

Implementors

Loading content...