Struct screeps_api::error::Error
[−]
[src]
pub struct Error { /* fields omitted */ }
Error deriving from some API call.
Methods
impl Error
[src]
fn with_url<T: Into<Error>>(err: T, url: Option<Url>) -> Error
[src]
Creates a new error from the given error and the given possible url.
fn with_json<T: Into<Error>>(
err: T,
url: Option<Url>,
json: Option<Value>
) -> Error
[src]
err: T,
url: Option<Url>,
json: Option<Value>
) -> Error
Creates a new error from the given error, the given possible url, and the given possible JSON data.
fn with_body<T: Into<Error>>(
err: T,
url: Option<Url>,
body: Option<Chunk>
) -> Error
[src]
err: T,
url: Option<Url>,
body: Option<Chunk>
) -> Error
Creates a new error from the given error, the given possible url, and the given possible body.
fn kind(&self) -> &ErrorKind
[src]
Retrieves the type specifying what kind of error, and a detailed description if available.
fn url(&self) -> Option<&Url>
[src]
Retrieves the URL associated with this error, if any.
fn json(&self) -> Option<&Value>
[src]
Retrieves the JSON data associated with this error, if any.
fn body(&self) -> Option<&Chunk>
[src]
Retrieves the body data associated with this error, if any.
Trait Implementations
impl Debug for Error
[src]
impl From<ErrorKind> for Error
[src]
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl From<ParseError> for Error
[src]
fn from(err: ParseError) -> Error
[src]
Performs the conversion.
impl From<Error> for Error
[src]
impl From<StatusCode> for Error
[src]
fn from(code: StatusCode) -> Error
[src]
Performs the conversion.
impl From<ApiError> for Error
[src]
impl<'a> From<RoomNameParseError<'a>> for Error
[src]
fn from(err: RoomNameParseError<'a>) -> Error
[src]
Performs the conversion.
impl From<NoToken> for Error
[src]
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more