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: 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.
Methods
impl WebmachineContext
[src]
fn default() -> WebmachineContext
Creates a default context
Trait Implementations
impl Debug for WebmachineContext
[src]
impl Clone for WebmachineContext
[src]
fn clone(&self) -> WebmachineContext
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for WebmachineContext
[src]
fn eq(&self, __arg_0: &WebmachineContext) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &WebmachineContext) -> bool
This method tests for !=
.