Trait coap_handler::implementations::SimpleRenderable
source · [−]pub trait SimpleRenderable {
fn render<W>(&mut self, writer: &mut W)
where
W: Write;
fn content_format(&self) -> Option<u16> { ... }
}
👎Deprecated
Expand description
A simplified Handler trait that can react to GET requests and will render to a fmt::Write object with blockwise backing.
Anything that implements it (which includes plain &str, for example) can be packed into a SimpleRendered to form a Handler.
Required Methods
Provided Methods
sourcefn content_format(&self) -> Option<u16>
fn content_format(&self) -> Option<u16>
👎Deprecated
If something is returned, GETs with differing Accept options will be rejecected, and the value will be set in responses.