emit_response

Macro emit_response 

Source
macro_rules! emit_response {
    ( $headers:expr, $resource:expr => $T:ident, $timestamp:expr ) => { ... };
    ( $headers:expr, $resource:expr => $T:ident ) => { ... };
}
Expand description

Given $resource of type $type that is serde Serializable and $headers (an instance of a type that handles HTTP request headers)…

  1. compute the Resource’s Etag, and instantiate both Etag and Last-Modified Headers,
  2. evaluate the If-Match pre-conditions,
  3. return a Response of the form Result<WithResource<T>, Status>.