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 and TryPatch traits, along with a derive macro patchable_macro::Patchable 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§

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

Derive Macros§

Patchable