Struct github::error::RequestError
[-] [+]
[src]
pub struct RequestError { pub code: ErrorStatus, pub errors: Vec<ErrorContext>, }
RequestError
will be returned as a Result<T, ClientError>
in case
a request responds negatively populated by information from
both the header and body.
Fields
code |
|
errors | In case detailed errors are available |
Methods
impl RequestError
fn new<T>(code: u32, buffer: &[u8]) -> Result<T, ClientError>
Simple way to construct a Result<T, ClientError>
based on
the status code given in the header and the body in a raw utf8 buffer.
Trait Implementations
impl Display for RequestError
Allowing RequestError
to be printed via {}
in a controlled manner.