pub trait SimpleCBORHandler {
    type Get: for<'de> Serialize;
    type Post: for<'de> Deserialize<'de>;
    type Put: for<'de> Deserialize<'de>;

    // Provided methods
    fn get(&mut self) -> Result<Self::Get, u8> { ... }
    fn post(&mut self, _representation: &Self::Post) -> u8 { ... }
    fn put(&mut self, _representation: &Self::Put) -> u8 { ... }
}
👎Deprecated
Expand description

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.

Required Associated Types§

source

type Get: for<'de> Serialize

👎Deprecated
source

type Post: for<'de> Deserialize<'de>

👎Deprecated
source

type Put: for<'de> Deserialize<'de>

👎Deprecated

Provided Methods§

source

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

👎Deprecated
source

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

👎Deprecated
source

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

👎Deprecated

Implementors§