pub enum ReceiptError {
ReceiptEmittedNotEmittable,
Conflict {
idempotency_key: String,
},
Invalid(ValidationError),
}Expand description
Failure variants from receipt emission.
Conflict is the spec-named duplicate_id_conflict: the same
(client_id, adapter_id, idempotency_key) tuple was reused with a
receipt body that does not match the prior content.
Variants§
ReceiptEmittedNotEmittable
receipt.emitted is a notification event and must not itself
produce a receipt. Rejected at emit time so a misuse cannot
land in the idempotency store.
Conflict
Same idempotency_key reused with different content. Maps
onto the spec’s duplicate_id_conflict failure class.
Invalid(ValidationError)
The synthesized receipt failed LifecycleReceipt::validate.
Trait Implementations§
Source§impl Clone for ReceiptError
impl Clone for ReceiptError
Source§fn clone(&self) -> ReceiptError
fn clone(&self) -> ReceiptError
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 ReceiptError
impl Debug for ReceiptError
Source§impl Display for ReceiptError
impl Display for ReceiptError
Source§impl Error for ReceiptError
impl Error for ReceiptError
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<&ReceiptError> for FailureClass
impl From<&ReceiptError> for FailureClass
Source§fn from(err: &ReceiptError) -> Self
fn from(err: &ReceiptError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for ReceiptError
impl From<ValidationError> for ReceiptError
Source§fn from(e: ValidationError) -> Self
fn from(e: ValidationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ReceiptError
impl PartialEq for ReceiptError
Source§fn eq(&self, other: &ReceiptError) -> bool
fn eq(&self, other: &ReceiptError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ReceiptError
impl StructuralPartialEq for ReceiptError
Auto Trait Implementations§
impl Freeze for ReceiptError
impl RefUnwindSafe for ReceiptError
impl Send for ReceiptError
impl Sync for ReceiptError
impl Unpin for ReceiptError
impl UnsafeUnpin for ReceiptError
impl UnwindSafe for ReceiptError
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.