[][src]Trait eve_rs::Context

pub trait Context {
    pub fn get_request(&self) -> &Request;
pub fn get_request_mut(&mut self) -> &mut Request;
pub fn get_response(&self) -> &Response;
pub fn take_response(self) -> Response;
pub fn get_response_mut(&mut self) -> &mut Response; pub fn get_body(&self) -> Result<String, Utf8Error> { ... }
pub fn json(&mut self, body: Value) -> &mut Self { ... }
pub fn body(&mut self, string: &str) -> &mut Self { ... }
pub fn body_bytes(&mut self, bytes: &[u8]) -> &mut Self { ... }
pub fn get_method(&self) -> &HttpMethod { ... }
pub fn get_status(&self) -> u16 { ... }
pub fn get_status_message(&self) -> &str { ... }
pub fn status(&mut self, code: u16) -> &mut Self { ... }
pub fn content_type(&mut self, content_type: &str) -> &mut Self { ... }
pub fn content_length(&mut self, length: usize) -> &mut Self { ... }
pub fn redirect(&mut self, destination: &str) -> &mut Self { ... }
pub fn attachment(&mut self, file_name: Option<&str>) -> &mut Self { ... }
pub fn get_path(&self) -> String { ... }
pub fn get_full_url(&self) -> String { ... }
pub fn get_origin(&self) -> Option<String> { ... }
pub fn get_query_string(&self) -> String { ... }
pub fn get_host(&self) -> String { ... }
pub fn get_host_and_port(&self) -> String { ... }
pub fn get_content_type(&self) -> String { ... }
pub fn get_charset(&self) -> Option<String> { ... }
pub fn get_protocol(&self) -> String { ... }
pub fn is_secure(&self) -> bool { ... }
pub fn get_ip(&self) -> IpAddr { ... }
pub fn is(&self, mimes: &[&str]) -> bool { ... }
pub fn get_header(&self, key: &str) -> Option<String> { ... }
pub fn header(&mut self, key: &str, value: &str) -> &mut Self { ... }
pub fn append_header(&mut self, key: &str, value: &str) -> &mut Self { ... }
pub fn remove_header(&mut self, key: &str) -> &mut Self { ... }
pub fn get_cookie(&self, name: &str) -> Option<&Cookie> { ... }
pub fn get_cookies(&self) -> &Vec<Cookie> { ... }
pub fn cookie(&mut self, cookie: Cookie) -> &mut Self { ... }
pub fn last_modified(&mut self, last_modified: &str) -> &mut Self { ... }
pub fn etag(&mut self, etag: &str) -> &mut Self { ... } }

Required methods

pub fn get_request(&self) -> &Request[src]

pub fn get_request_mut(&mut self) -> &mut Request[src]

pub fn get_response(&self) -> &Response[src]

pub fn take_response(self) -> Response[src]

pub fn get_response_mut(&mut self) -> &mut Response[src]

Loading content...

Provided methods

pub fn get_body(&self) -> Result<String, Utf8Error>[src]

pub fn json(&mut self, body: Value) -> &mut Self[src]

pub fn body(&mut self, string: &str) -> &mut Self[src]

pub fn body_bytes(&mut self, bytes: &[u8]) -> &mut Self[src]

pub fn get_method(&self) -> &HttpMethod[src]

pub fn get_status(&self) -> u16[src]

pub fn get_status_message(&self) -> &str[src]

pub fn status(&mut self, code: u16) -> &mut Self[src]

pub fn content_type(&mut self, content_type: &str) -> &mut Self[src]

pub fn content_length(&mut self, length: usize) -> &mut Self[src]

pub fn redirect(&mut self, destination: &str) -> &mut Self[src]

pub fn attachment(&mut self, file_name: Option<&str>) -> &mut Self[src]

pub fn get_path(&self) -> String[src]

pub fn get_full_url(&self) -> String[src]

pub fn get_origin(&self) -> Option<String>[src]

pub fn get_query_string(&self) -> String[src]

pub fn get_host(&self) -> String[src]

pub fn get_host_and_port(&self) -> String[src]

pub fn get_content_type(&self) -> String[src]

pub fn get_charset(&self) -> Option<String>[src]

pub fn get_protocol(&self) -> String[src]

pub fn is_secure(&self) -> bool[src]

pub fn get_ip(&self) -> IpAddr[src]

pub fn is(&self, mimes: &[&str]) -> bool[src]

pub fn get_header(&self, key: &str) -> Option<String>[src]

pub fn header(&mut self, key: &str, value: &str) -> &mut Self[src]

pub fn append_header(&mut self, key: &str, value: &str) -> &mut Self[src]

pub fn remove_header(&mut self, key: &str) -> &mut Self[src]

pub fn get_cookies(&self) -> &Vec<Cookie>[src]

pub fn cookie(&mut self, cookie: Cookie) -> &mut Self[src]

pub fn last_modified(&mut self, last_modified: &str) -> &mut Self[src]

pub fn etag(&mut self, etag: &str) -> &mut Self[src]

Loading content...

Implementors

impl Context for DefaultContext[src]

Loading content...