Struct backtalk::Error [] [src]

pub struct Error { /* fields omitted */ }

An error response to be sent back to the client.

Contains a JSON error that the client can reply to. The easiest way to create one of these is the various Error::bad_request, Error::unavailable etc. functions, which automatically return a BoxFuture<T, Error>, so you can return them directly from an and_then closure without wrapping in a future or boxing.

If you need custom JSON in your error, you can use the Error::new function directly.

Currently there's no way to access or change the insides of an Error, but that probably will change in the near future.

Methods

impl Error
[src]

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.