CloudMutationBackend

Trait CloudMutationBackend 

Source
pub trait CloudMutationBackend: Send + Sync {
    // Required methods
    fn apply_mutation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        intent: &'life1 MutationIntent,
    ) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn reconcile_mutation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        intent: &'life1 MutationIntent,
    ) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Product-owned adapter for applying and reconciling durable mutations.

Implementations own transport, authentication, product DTOs, stable/provisional identity mapping, and backend-specific status queries. Self::apply_mutation must use the intent’s idempotency identity. A transport result that does not prove whether the effect committed must return MutationRemoteOutcome::RemoteOutcomeUnknown rather than an ordinary backend error.

Required Methods§

Source

fn apply_mutation<'life0, 'life1, 'async_trait>( &'life0 self, intent: &'life1 MutationIntent, ) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Applies one idempotently identified mutation to the product backend.

Source

fn reconcile_mutation<'life0, 'life1, 'async_trait>( &'life0 self, intent: &'life1 MutationIntent, ) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolves an explicitly unknown remote outcome through status or change reconciliation.

Implementors§