Merge

Trait Merge 

Source
pub trait Merge<Rhs = Self> {
    type Output;

    // Required method
    fn merge(self, rhs: Rhs) -> Self::Output;
}
Expand description

An operator that merges two patch values.

This operation must be coherent with Patch so that the two following codes are equivalent.

// 1
value.patch(patch_1);
value.patch(patch_2);

// 2
value.patch(patch_1.merge(patch_2))

Required Associated Types§

Source

type Output

The result of the merge operation.

Required Methods§

Source

fn merge(self, rhs: Rhs) -> Self::Output

Merges self and rhs.

Implementations on Foreign Types§

Source§

impl<T> Merge for Option<T>

Source§

type Output = Option<T>

Source§

fn merge(self, rhs: Self) -> Self::Output

Implementors§