Struct webmachine_rust::context::WebmachineContext [] [src]

pub struct WebmachineContext {
    pub request: WebmachineRequest,
    pub response: WebmachineResponse,
    pub selected_media_type: Option<String>,
    pub selected_language: Option<String>,
    pub selected_charset: Option<String>,
    pub selected_encoding: Option<String>,
    pub if_unmodified_since: Option<DateTime<FixedOffset>>,
    pub if_modified_since: Option<DateTime<FixedOffset>>,
    pub redirect: bool,
    pub new_resource: bool,
    pub metadata: HashMap<String, String>,
}

Main context struct that holds the request and response.

Fields

Request that the webmachine is executing against

Response that is the result of the execution

selected media type after content negotiation

selected language after content negotiation

selected charset after content negotiation

selected encoding after content negotiation

parsed date and time from the If-Unmodified-Since header

parsed date and time from the If-Modified-Since header

If the response should be a redirect

If a new resource was created

General store of metadata. You can use this to store attributes as the webmachine executes.

Methods

impl WebmachineContext
[src]

Creates a default context

Trait Implementations

impl Debug for WebmachineContext
[src]

Formats the value using the given formatter.

impl Clone for WebmachineContext
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for WebmachineContext
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.