Skip to main content

GuardedMutationExecutor

Trait GuardedMutationExecutor 

Source
pub trait GuardedMutationExecutor: MutationExecutor {
    // Required method
    fn mutate_guarded(
        &self,
        request: GuardedMutationRequest,
    ) -> impl Future<Output = Result<MutationResult, Self::Error>> + Send;
}
Expand description

Executes a mutation only when its target also satisfies a trusted guard.

Implementations must apply the guard atomically in the same datastore statement as the mutation. A separate read-before-write check does not satisfy this contract.

Required Methods§

Source

fn mutate_guarded( &self, request: GuardedMutationRequest, ) -> impl Future<Output = Result<MutationResult, Self::Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§