HttpError

Enum HttpError 

Source
pub enum HttpError {
Show 20 variants BadRequest, Configure(ApiError), DaemonInfo(ApiError), Events(ApiError), NoRoute, ParseBody(Error), QueryString(String), Mount(ApiError), Upgrade(ApiError), BackendMetrics(ApiError), BlobcacheMetrics(ApiError), FsBackendInfo(ApiError), FsFilesMetrics(ApiError), GlobalMetrics(ApiError), InflightMetrics(ApiError), Pattern(ApiError), CreateBlobObject(ApiError), DeleteBlobObject(ApiError), DeleteBlobFile(ApiError), GetBlobObjects(ApiError),
}
Expand description

HTTP error messages sent back to the clients.

The HttpError object will be sent back to client with format!("{:?}", http_error). So unfortunately it implicitly becomes parts of the API, please keep it stable.

Variants§

§

BadRequest

Invalid HTTP request

§

Configure(ApiError)

Failed to configure the daemon.

§

DaemonInfo(ApiError)

Failed to query information about daemon.

§

Events(ApiError)

Failed to query global events.

§

NoRoute

No handler registered for HTTP request URI

§

ParseBody(Error)

Failed to parse HTTP request message body

§

QueryString(String)

Query parameter is missed from the HTTP request.

§

Mount(ApiError)

Failed to mount filesystem.

§

Upgrade(ApiError)

Failed to remount filesystem.

§

BackendMetrics(ApiError)

Failed to get backend metrics.

§

BlobcacheMetrics(ApiError)

Failed to get blobcache metrics.

§

FsBackendInfo(ApiError)

Failed to get filesystem backend information

§

FsFilesMetrics(ApiError)

Failed to get filesystem per-file metrics.

§

GlobalMetrics(ApiError)

Failed to get global metrics.

§

InflightMetrics(ApiError)

Failed to get information about inflight request

§

Pattern(ApiError)

Failed to get filesystem file access trace.

§

CreateBlobObject(ApiError)

Failed to create blob object

§

DeleteBlobObject(ApiError)

Failed to delete blob object

§

DeleteBlobFile(ApiError)

Failed to delete blob file

§

GetBlobObjects(ApiError)

Failed to list existing blob objects

Trait Implementations§

Source§

impl Debug for HttpError

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.