Skip to main content

Mutation

Trait Mutation 

Source
pub trait Mutation: Sealed {
    // Required methods
    fn into_mutation(self) -> MutationAnswer;
    fn applied(&mut self, id: u64);
}
Expand description

The closed set of mutation payloads an executable plan can carry. External payloads cannot authorize writes:

ⓘ
use vvv_engine::{Mutation, MutationAnswer};
struct External;
impl Mutation for External {
    fn into_mutation(self) -> MutationAnswer { unimplemented!() }
    fn applied(&mut self, _: u64) {}
}

Required Methods§

Source

fn into_mutation(self) -> MutationAnswer

Wrap this payload in the closed mutation result.

Source

fn applied(&mut self, id: u64)

Mark the result as written by history entry id.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§