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

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: WebmachineRequest

Request that the webmachine is executing against

response: WebmachineResponse

Response that is the result of the execution

selected_media_type: Option<String>

selected media type after content negotiation

selected_language: Option<String>

selected language after content negotiation

selected_charset: Option<String>

selected charset after content negotiation

selected_encoding: Option<String>

selected encoding after content negotiation

if_unmodified_since: Option<DateTime<FixedOffset>>

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

if_modified_since: Option<DateTime<FixedOffset>>

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

redirect: bool

If the response should be a redirect

new_resource: bool

If a new resource was created

metadata: HashMap<String, String>

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

Trait Implementations

impl Clone for WebmachineContext[src]

impl Debug for WebmachineContext[src]

impl Default for WebmachineContext[src]

fn default() -> WebmachineContext[src]

Creates a default context

impl PartialEq<WebmachineContext> for WebmachineContext[src]

impl StructuralPartialEq for WebmachineContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.