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