Struct webmachine_rust::context::WebmachineContext  
source · 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>,
}Expand description
Main context struct that holds the request and response.
Fields§
§request: WebmachineRequestRequest that the webmachine is executing against
response: WebmachineResponseResponse 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: boolIf the response should be a redirect
new_resource: boolIf 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§
source§impl Clone for WebmachineContext
 
impl Clone for WebmachineContext
source§fn clone(&self) -> WebmachineContext
 
fn clone(&self) -> WebmachineContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for WebmachineContext
 
impl Debug for WebmachineContext
source§impl Default for WebmachineContext
 
impl Default for WebmachineContext
source§fn default() -> WebmachineContext
 
fn default() -> WebmachineContext
Creates a default context
source§impl PartialEq<WebmachineContext> for WebmachineContext
 
impl PartialEq<WebmachineContext> for WebmachineContext
source§fn eq(&self, other: &WebmachineContext) -> bool
 
fn eq(&self, other: &WebmachineContext) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for WebmachineContext
Auto Trait Implementations§
impl RefUnwindSafe for WebmachineContext
impl Send for WebmachineContext
impl Sync for WebmachineContext
impl Unpin for WebmachineContext
impl UnwindSafe for WebmachineContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more