#[non_exhaustive]pub enum StoreError {
Accepted {
monitor: Option<String>,
},
Invalid(String),
Unprocessable(String),
Conflict(String),
Forbidden(String),
Internal(String),
}server only.Expand description
Why a store could not do what was asked.
§Accepted is here on purpose
Every v5 POST and PATCH declares 202 alongside its synchronous answer,
because a deployment may fulfil a write asynchronously. A store says so by
returning StoreError::Accepted — the same shape the client side takes,
where Error::Accepted is a variant of the error enum for the same
reason: the call asked for a resource and did not produce one. It is
control flow, not a failure, and both ends model it the same way.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Accepted
The write was taken but has not completed. Answers 202 Accepted.
Invalid(String)
The request is malformed or violates a constraint. Answers 400.
Unprocessable(String)
The request is well-formed but cannot be satisfied in this state.
Answers 422 Unprocessable Content.
Conflict(String)
The resource conflicts with one that exists. Answers 409.
Forbidden(String)
The caller may not do this. Answers 403.
Internal(String)
Something went wrong that is not the caller’s fault. Answers 500.
Trait Implementations§
Source§impl Clone for StoreError
impl Clone for StoreError
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
impl Eq for StoreError
Source§impl Error for StoreError
impl Error for StoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for StoreError
impl PartialEq for StoreError
impl StructuralPartialEq for StoreError
Auto Trait Implementations§
impl Forget for StoreError
impl Freeze for StoreError
impl Move for StoreError
impl RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
impl UnwindSafe for StoreError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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.