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

code represents the given status code stored in the form of ErrorStatus.

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.

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Debug for RequestError

fn fmt(&self, __arg_0: &mut Formatter) -> Result