pub enum PreconditionError {
Required,
Invalid(InvalidIfMatch),
Stale {
current: Option<Revision>,
},
}Expand description
A failed revision precondition.
Converts into ApiError as 428 precondition_required, 400 invalid_if_match, or 412
precondition_failed.
Variants§
Required
A route that requires If-Match received none.
Invalid(InvalidIfMatch)
The If-Match value is not one strong ETag for the resource.
Stale
The expected revision is not the stored one.
Implementations§
Trait Implementations§
Source§impl Clone for PreconditionError
impl Clone for PreconditionError
impl Copy for PreconditionError
Source§impl Debug for PreconditionError
impl Debug for PreconditionError
Source§impl Display for PreconditionError
impl Display for PreconditionError
impl Eq for PreconditionError
Source§impl Error for PreconditionError
impl Error for PreconditionError
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<InvalidIfMatch> for PreconditionError
impl From<InvalidIfMatch> for PreconditionError
Source§fn from(error: InvalidIfMatch) -> Self
fn from(error: InvalidIfMatch) -> Self
Converts to this type from the input type.
Source§impl From<PreconditionError> for ApiError
impl From<PreconditionError> for ApiError
Source§fn from(error: PreconditionError) -> Self
fn from(error: PreconditionError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PreconditionError
impl PartialEq for PreconditionError
impl StructuralPartialEq for PreconditionError
Auto Trait Implementations§
impl Freeze for PreconditionError
impl RefUnwindSafe for PreconditionError
impl Send for PreconditionError
impl Sync for PreconditionError
impl Unpin for PreconditionError
impl UnsafeUnpin for PreconditionError
impl UnwindSafe for PreconditionError
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
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§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.