pub enum RemoteStoreError {
PreconditionFailed(ConcurrencyConflict),
PreconditionRequired {
detail: String,
},
IdempotencyConflict {
reason: String,
},
Unauthorized {
policy: String,
reason: String,
},
NotFound,
IntegrityMismatch {
expected: String,
actual: String,
},
NotYetImplemented {
detail: String,
},
Internal {
message: String,
},
}Expand description
Errors a remote store can return, each mapped to its HTTP status so the client and server agree on the contract.
Variants§
PreconditionFailed(ConcurrencyConflict)
If-Match/generation precondition failed — 412.
PreconditionRequired
A guarded write pinned no prior state — 428.
IdempotencyConflict
Idempotency key reused with a different request — 409.
RBAC denied the mutation — 403.
Fields
NotFound
Resource does not exist — 404.
IntegrityMismatch
Stored state failed its integrity hash — 422.
NotYetImplemented
The operation is recognized but not yet implemented — 501.
Internal
Store-internal failure — 500.
Implementations§
Source§impl RemoteStoreError
impl RemoteStoreError
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
HTTP status code this error maps to.
Trait Implementations§
Source§impl Clone for RemoteStoreError
impl Clone for RemoteStoreError
Source§fn clone(&self) -> RemoteStoreError
fn clone(&self) -> RemoteStoreError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoteStoreError
impl Debug for RemoteStoreError
Source§impl<'de> Deserialize<'de> for RemoteStoreError
impl<'de> Deserialize<'de> for RemoteStoreError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RemoteStoreError
impl Display for RemoteStoreError
impl Eq for RemoteStoreError
Source§impl Error for RemoteStoreError
impl Error for RemoteStoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<PreconditionError> for RemoteStoreError
impl From<PreconditionError> for RemoteStoreError
Source§fn from(err: PreconditionError) -> Self
fn from(err: PreconditionError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RemoteStoreError
impl PartialEq for RemoteStoreError
Source§fn eq(&self, other: &RemoteStoreError) -> bool
fn eq(&self, other: &RemoteStoreError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RemoteStoreError
impl Serialize for RemoteStoreError
impl StructuralPartialEq for RemoteStoreError
Auto Trait Implementations§
impl Freeze for RemoteStoreError
impl RefUnwindSafe for RemoteStoreError
impl Send for RemoteStoreError
impl Sync for RemoteStoreError
impl Unpin for RemoteStoreError
impl UnsafeUnpin for RemoteStoreError
impl UnwindSafe for RemoteStoreError
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
Mutably borrows from an owned value. Read more
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.