pub struct MutationRecord { /* private fields */ }Expand description
Recoverable durable mutation journal record.
Implementations§
Source§impl MutationRecord
impl MutationRecord
Sourcepub fn persist(intent: MutationIntent) -> Result<Self>
pub fn persist(intent: MutationIntent) -> Result<Self>
Converts a validated in-memory intent into its first recoverable journal state.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub const fn intent(&self) -> &MutationIntent
pub const fn intent(&self) -> &MutationIntent
Returns the immutable persisted intent.
Sourcepub const fn state(&self) -> MutationState
pub const fn state(&self) -> MutationState
Returns the current durable state.
Sourcepub const fn remote_outcome(&self) -> Option<&MutationRemoteOutcome>
pub const fn remote_outcome(&self) -> Option<&MutationRemoteOutcome>
Returns the durable remote outcome, when one has been recorded.
Sourcepub fn begin_remote_apply(&mut self) -> Result<MutationRecordTransition>
pub fn begin_remote_apply(&mut self) -> Result<MutationRecordTransition>
Marks that a remote effect has started.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub fn record_remote_outcome(
&mut self,
outcome: MutationRemoteOutcome,
) -> Result<MutationRecordTransition>
pub fn record_remote_outcome( &mut self, outcome: MutationRemoteOutcome, ) -> Result<MutationRecordTransition>
Durably records a known or unknown remote outcome.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub fn mark_platform_reconciled(&mut self) -> Result<MutationRecordTransition>
pub fn mark_platform_reconciled(&mut self) -> Result<MutationRecordTransition>
Marks required platform effects as reconciled.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub fn complete(&mut self) -> Result<MutationRecordTransition>
pub fn complete(&mut self) -> Result<MutationRecordTransition>
Marks the operation complete after platform reconciliation.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Trait Implementations§
Source§impl Clone for MutationRecord
impl Clone for MutationRecord
Source§fn clone(&self) -> MutationRecord
fn clone(&self) -> MutationRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more