Struct webmachine_rust::context::WebmachineResponse [] [src]

pub struct WebmachineResponse {
    pub status: u16,
    pub headers: BTreeMap<String, Vec<HeaderValue>>,
    pub body: Option<String>,
}

Response that is generated as a result of the webmachine execution

Fields

status code to return

headers to return

Response Body

Methods

impl WebmachineResponse
[src]

Creates a default response (200 OK)

If the response has the provided header

Adds the header values to the headers

Adds the headers from a HashMap to the headers

Adds standard CORS headers to the response

Returns a HaspMap of standard CORS headers

If the response has a body

Trait Implementations

impl Debug for WebmachineResponse
[src]

Formats the value using the given formatter.

impl Clone for WebmachineResponse
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for WebmachineResponse
[src]

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

This method tests for !=.