pub enum ErrorClass {
BadRequest,
Unauthenticated,
Forbidden,
NotFound,
Conflict,
PreconditionFailed,
PayloadTooLarge,
UnsupportedMediaType,
Unprocessable,
Internal,
NotWired,
Unavailable,
}Expand description
One kind of refusal, and the status it answers with.
Every refusal answers {"error": "<sentence>"}; the class decides only the
status. An operation’s documented statuses are the classes every route can
answer, the classes its extractors can answer, and the ones its own entry
names.
Variants§
BadRequest
An identifier that does not parse, a request whose content is wrong, or a body that is not JSON.
Unauthenticated
No credential, or one the authenticator refused.
Forbidden
The policy refused, the caller’s tenant has no plane here, or the store refused this caller.
NotFound
The thing named does not exist.
Conflict
The state of what was named refuses the request.
PreconditionFailed
A decision named a version of the task that is no longer the stored one.
PayloadTooLarge
A body larger than the surface reads.
UnsupportedMediaType
A body sent without Content-Type: application/json.
Unprocessable
A body that is JSON but not this operation’s shape — an unknown member, a missing one, a wrong type — or a decision the plane cannot act on.
Internal
The store failed, the policy set could not be evaluated, or the authenticated identity cannot be recorded.
NotWired
This plane was built without the store the operation needs.
The store failed while delivering an event; a sender should retry.
Implementations§
Trait Implementations§
Source§impl Clone for ErrorClass
impl Clone for ErrorClass
impl Copy for ErrorClass
Source§impl Debug for ErrorClass
impl Debug for ErrorClass
impl Eq for ErrorClass
Source§impl Ord for ErrorClass
impl Ord for ErrorClass
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ErrorClass
impl PartialEq for ErrorClass
Source§impl PartialOrd for ErrorClass
impl PartialOrd for ErrorClass
impl StructuralPartialEq for ErrorClass
Auto Trait Implementations§
impl Freeze for ErrorClass
impl RefUnwindSafe for ErrorClass
impl Send for ErrorClass
impl Sync for ErrorClass
impl Unpin for ErrorClass
impl UnsafeUnpin for ErrorClass
impl UnwindSafe for ErrorClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more