Trait coap_handler::implementations::SimpleRenderable[][src]

pub trait SimpleRenderable {
    fn render<W>(&mut self, writer: &mut W)
    where
        W: Write
; fn content_format(&self) -> Option<u16> { ... } }

A simplified Handler trait that can react to GET requests and will render to a fmt::Write object with blockwise backing.

Upcoming changes

There currently is an implementation of Handler for T where T: SimpleRenderable.

This implementation is deprecated, and will be removed from future versions. Instead, wrap any SimpleRenderable into a SimpleRendered to make a Handler out of it.

Required methods

fn render<W>(&mut self, writer: &mut W) where
    W: Write
[src]

Loading content...

Provided methods

fn content_format(&self) -> Option<u16>[src]

If something is returned, GETs with differing Accept options will be rejecected, and the value will be set in responses.

Loading content...

Implementors

impl<'a> SimpleRenderable for &'a str[src]

Loading content...