Skip to main content

Crate patchable

Crate patchable 

Source
Expand description

§Patchable

A crate for handling partial updates to data structures.

This crate provides the Patchable, Patch, and TryPatch traits, along with derive macros patchable_macro::Patchable and patchable_macro::Patch for easy implementation.

§Motivation

Many systems receive incremental updates where only a subset of fields change or can be considered as parts of state. This crate formalizes this pattern by defining a patch type for a structure and providing a consistent way to apply such patches safely.

Traits§

Patch
A data structure that can be updated using a corresponding patch.
Patchable
A data structure that can be updated using a corresponding patch.
TryPatch
A fallible variant of Patch.

Derive Macros§

Patch
Patchable