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 { ... }
}
👎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
sourcetype Post: for<'de> Deserialize<'de>
type Post: for<'de> Deserialize<'de>
👎Deprecated
sourcetype Put: for<'de> Deserialize<'de>
type Put: for<'de> Deserialize<'de>
👎Deprecated