Struct sincere::http::Response
[−]
[src]
pub struct Response { /* fields omitted */ }
Methods
impl Response
[src]
fn new(
status_code: StatusCode,
headers: HashMap<String, String>,
data: Vec<u8>
) -> Response
[src]
status_code: StatusCode,
headers: HashMap<String, String>,
data: Vec<u8>
) -> Response
fn empty<S>(status_code: S) -> Response where
S: Into<StatusCode>,
[src]
S: Into<StatusCode>,
fn from_data<C, D>(&mut self, content_type: C, data: D) -> Result<&mut Response> where
C: Into<String>,
D: Into<Vec<u8>>,
[src]
C: Into<String>,
D: Into<Vec<u8>>,
fn from_file<C>(&mut self, content_type: C, file: File) -> Result<&mut Response> where
C: Into<String>,
[src]
C: Into<String>,
fn from_text<S>(&mut self, string: S) -> Result<&mut Response> where
S: Into<String>,
[src]
S: Into<String>,
fn from_html<S>(&mut self, string: S) -> Result<&mut Response> where
S: Into<String>,
[src]
S: Into<String>,
fn from_json<S: Serialize>(&mut self, value: S) -> Result<&mut Response>
[src]
fn status_code(&mut self, code: u16) -> &mut Response
[src]
fn get_status_code(&self) -> u16
[src]
fn header<S>(&mut self, header: (S, S)) -> &mut Response where
S: Into<String>,
[src]
S: Into<String>,