[][src]Enum humblegen_rt::service_protocol::ServiceError

pub enum ServiceError {
    Authentication,
    Authorization,
    Internal(String),
}

A service-level error.

This type is returned by implementors of a humblegen service trait function as part of a HandlerResponse.

Variants

Authentication

The request cannot be fulfilled due to an authentication problem. Maps to HTTP status code 401.

Authorization

The request cannot be fulfilled due to an authorization problem. Maps to HTTP status code 403.

Internal(String)

The request cannot be fulfilled due to an error internal to the service that is not domain-specific. (Domain-specific errors should be represented as humblespec result types in the service definition.) Maps to HTTP status code 500. Examples: no database connection

Implementations

impl ServiceError[src]

pub fn status_code(&self) -> u16[src]

Trait Implementations

impl Debug for ServiceError[src]

impl<'de> Deserialize<'de> for ServiceError[src]

impl From<ServiceError> for ServiceError[src]

impl Serialize for ServiceError[src]

impl ToErrorResponse for ServiceError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]