icydb_core/patch/mod.rs
1pub mod list;
2pub mod map;
3pub mod merge;
4pub mod set;
5
6pub use list::ListPatch;
7pub use map::MapPatch;
8pub use merge::{MergePatch, MergePatchError};
9pub use set::SetPatch;
10
11///
12/// AtomicPatch
13///
14/// Marker trait for values whose patch semantics are **full replacement**.
15///
16/// Types implementing `AtomicPatch` are treated as indivisible at the patch layer:
17/// their `MergePatch` implementation replaces the entire value rather than
18/// performing a structural merge.
19///
20/// This is appropriate for:
21/// - primitive values
22/// - numeric wrappers
23/// - timestamps
24/// - fixed-point / scalar domain types
25///
26/// Invariant:
27/// `AtomicPatch` types must correspond to `FieldValueKind::Atomic`.
28///
29/// This trait has no methods; it exists solely to opt a type into
30/// overwrite-only merge semantics via a blanket `MergePatch` implementation.
31///
32
33pub trait AtomicPatch: Sized {}