//! Reducer that shallow-merges extra key-value pairs into the extras channel.
//!
//! Follows [JSON Merge Patch](https://www.rfc-editor.org/rfc/rfc7396) (RFC 7396):
//! a `null` value removes the corresponding key from state rather than writing null.
//! This gives [`NodePartial::clear_extra_keys`](crate::node::NodePartial::clear_extra_keys)
//! and [`NodePartial::clear_typed_extra_key`](crate::node::NodePartial::clear_typed_extra_key)
//! full key-deletion semantics without a separate cleanup reducer.
use Reducer;
use crate::;
/// Merges extra key-value pairs from a [`NodePartial`] into the state extras channel.
///
/// Uses JSON Merge Patch semantics (RFC 7396): an incoming `null` deletes the key;
/// any other value overwrites it. This makes
/// [`NodePartial::clear_extra_keys`](crate::node::NodePartial::clear_extra_keys) and
/// [`NodePartial::clear_typed_extra_key`](crate::node::NodePartial::clear_typed_extra_key)
/// perform a complete key deletion — no cleanup reducer required.
;