Struct libgerrit::call::CallResponse
[−]
[src]
pub struct CallResponse { /* fields omitted */ }
represent a http resonse
Methods
impl CallResponse
[src]
fn status(&self) -> u32
[src]
Returns the status code of the response
fn failed(&self) -> bool
[src]
Indicates that the request failed
fn ok(&self) -> bool
[src]
Indicates that the request succeeded
fn to_result(&self) -> GGRResult<&CallResponse>
[src]
Converts the response into a result object. This also converts non okay response codes into errors.
fn deserialize<T>(&self) -> GGRResult<T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
Deserializes the response body into the given type
fn convert<T: DeserializeOwned>(self) -> GGRResult<T>
[src]
Like deserialize
but consumes the response and will convert
failed requests into proper errors.
fn headers(&self) -> Headers
[src]
Iterates over the headers.
fn get_header(&self, key: &str) -> Option<&str>
[src]
Looks up the first matching header for a key.
fn get_body(&self) -> Option<Vec<u8>>
[src]
give back the body content
Trait Implementations
impl Clone for CallResponse
[src]
fn clone(&self) -> CallResponse
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more