pub struct MutationReceipt {
pub receipt_id: String,
pub idempotency_key: String,
pub fingerprint: String,
pub operation: String,
pub state: String,
pub target_ref: String,
pub reconciliation_required: bool,
pub replayed: bool,
pub created_at: DateTime<Utc>,
}Expand description
Durable, wire-independent projection of an idempotent mutation receipt.
Fields§
§receipt_id: StringStable receipt identity.
idempotency_key: StringIdempotency key bound to the canonical fingerprint.
fingerprint: StringCanonical normalized command fingerprint.
operation: StringProduct-neutral operation identifier.
state: StringDurable mutation outcome.
target_ref: StringStable target binding.
reconciliation_required: boolWhether external reconciliation is required.
replayed: boolWhether this returned projection came from an exact replay.
The durable original is always stored with false; storage sets this to true only on a
cloned return projection for an exact idempotent replay.
created_at: DateTime<Utc>Time at which the original mutation committed.
Implementations§
Source§impl MutationReceipt
impl MutationReceipt
Sourcepub fn replayed_projection(&self) -> Self
pub fn replayed_projection(&self) -> Self
Return a replay projection without mutating the durable original receipt.
Sourcepub fn validate(&self) -> SessionStoreResult<()>
pub fn validate(&self) -> SessionStoreResult<()>
Trait Implementations§
Source§impl Clone for MutationReceipt
impl Clone for MutationReceipt
Source§fn clone(&self) -> MutationReceipt
fn clone(&self) -> MutationReceipt
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 MutationReceipt
impl Debug for MutationReceipt
Source§impl<'de> Deserialize<'de> for MutationReceipt
impl<'de> Deserialize<'de> for MutationReceipt
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
impl Eq for MutationReceipt
Source§impl PartialEq for MutationReceipt
impl PartialEq for MutationReceipt
Source§impl Serialize for MutationReceipt
impl Serialize for MutationReceipt
impl StructuralPartialEq for MutationReceipt
Source§impl VersionedRecord for MutationReceipt
impl VersionedRecord for MutationReceipt
Source§const ALLOW_BARE_V0: bool = false
const ALLOW_BARE_V0: bool = false
Whether this record explicitly accepts a previous bare-JSON v0 shape.
Source§fn decode_version(
version: u32,
payload: Value,
) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
fn decode_version(
version: u32,
payload: Value,
) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
Decode one enveloped payload version. Read more
Source§fn decode_bare_v0(payload: Value) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
fn decode_bare_v0(payload: Value) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
Decode the explicitly supported bare-JSON v0 shape. Read more
Auto Trait Implementations§
impl Freeze for MutationReceipt
impl RefUnwindSafe for MutationReceipt
impl Send for MutationReceipt
impl Sync for MutationReceipt
impl Unpin for MutationReceipt
impl UnsafeUnpin for MutationReceipt
impl UnwindSafe for MutationReceipt
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