PostRenderable

Trait PostRenderable 

Source
pub trait PostRenderable {
    type PostIn;
    type PostOut;

    // Provided method
    fn post(
        &mut self,
        _representation: &Self::PostIn,
    ) -> Result<Self::PostOut, Error> { ... }
}
Expand description

Subset of TypeRenderable that handles the POST method.

Required Associated Types§

Source

type PostIn

Input type of the post() method, deserialized from the request payload.

Source

type PostOut

Ouptut type of the post() method, serialized into the response payload.

Note that this is a size sensitive type: On CoAP servers that need to retain state between processing a request and sending a response, this type goes into that state.

Provided Methods§

Source

fn post( &mut self, _representation: &Self::PostIn, ) -> Result<Self::PostOut, Error>

Implementors§