#[non_exhaustive]pub enum ArrayStrategy {
Replace,
Concat,
}Expand description
How to combine two arrays found at the same key during a merge.
The strategy is chosen per key by the caller (see merge_with); the merge
mechanism itself is policy-free — it does not know what any key “means”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Replace
The overlay array replaces the base array wholesale (last-wins).
Concat
The overlay array is appended to the base array (concatenation).
Trait Implementations§
Source§impl Clone for ArrayStrategy
impl Clone for ArrayStrategy
Source§fn clone(&self) -> ArrayStrategy
fn clone(&self) -> ArrayStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ArrayStrategy
Source§impl Debug for ArrayStrategy
impl Debug for ArrayStrategy
impl Eq for ArrayStrategy
Source§impl PartialEq for ArrayStrategy
impl PartialEq for ArrayStrategy
Source§fn eq(&self, other: &ArrayStrategy) -> bool
fn eq(&self, other: &ArrayStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ArrayStrategy
Auto Trait Implementations§
impl Freeze for ArrayStrategy
impl RefUnwindSafe for ArrayStrategy
impl Send for ArrayStrategy
impl Sync for ArrayStrategy
impl Unpin for ArrayStrategy
impl UnsafeUnpin for ArrayStrategy
impl UnwindSafe for ArrayStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more