pub trait Patch<P> {
    fn apply(&mut self, patch: P);
    fn into_patch_by_diff(self, previous_struct: Self) -> P;
    fn new_empty_patch() -> P;
}
Expand description

The trait can apply patch and generete corresponding patch instance

Required Methods§

Apply the patch, only update the existing fields

Diff on a previous state and into the patch instance

Get an empty patch instance

Implementors§