pub enum Strategy {
Append,
Replace,
Fail,
}Expand description
What to do where a layer supplies a value for a path that already has one.
Every strategy is terminal: it consumes the overlay whole and never recurses, so no rule below one can ever fire. The default merge is the absence of a rule, not a variant here.
The order of the variants is the tie-break used when reporting conflicts, so that the message does not depend on the order rules were given in.
Variants§
Append
Concatenate base ++ overlay. Both sides must be arrays.
Replace
Assign wholesale, no recursion, even object over object.
Fail
Error. The first layer to define the path pins it.
Trait Implementations§
impl Copy for Strategy
impl Eq for Strategy
Source§impl Ord for Strategy
impl Ord for Strategy
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Strategy
impl PartialOrd for Strategy
impl StructuralPartialEq for Strategy
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.