Skip to main content

AtomicPatch

Trait AtomicPatch 

Source
pub trait AtomicPatch: Sized { }
Expand description

AtomicPatch

Marker trait for values whose patch semantics are full replacement.

Types implementing AtomicPatch are treated as indivisible at the patch layer: their MergePatch implementation replaces the entire value rather than performing a structural merge.

This is appropriate for:

  • primitive values
  • numeric wrappers
  • timestamps
  • fixed-point / scalar domain types

Invariant: AtomicPatch types must correspond to FieldValueKind::Atomic.

This trait has no methods; it exists solely to opt a type into overwrite-only merge semantics via a blanket MergePatch implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§