Trait dipa::Patchable[][src]

pub trait Patchable<P> {
    fn apply_patch(&mut self, patch: P);
}
Expand description

Modifies a type using n a patch.

You would typically create this patch using [Diffable.create_delta_towards].

You’ll typically serialize to a Diffable::Delta, send it over a network and then deserialize to Diffable::DeltaOwned. Then you would use that owned delta as the patch to apply via [Patchable.apply_patch].

FIXME: This should return a result since it is possible to, for example, accidentally apply a a patch to the wrong data structure do to a logical bug.

Required methods

Apply a patch.

Implementations on Foreign Types

Implementors