Lines Matching full:merge
6 # merge-rs
8 The `merge` crate provides the `Merge` trait that can be used to merge multiple
12 trait Merge {
13 fn merge(&mut self, other: Self);
17 `Merge` is implemented for `Option` and can be derived for structs:
21 use merge::Merge;
23 #[derive(Merge)]
25 // Fields with the skip attribute are skipped by Merge
26 #[merge(skip)]
29 // The Merge implementation for Option replaces its value if it is None
32 // The strategy attribute is used to customize the merge behavior
33 #[merge(strategy = merge::vec::append)]
47 ferris.merge(defaults);
54 A merge strategy is a function with the signature `fn merge<T>(left: &mut T,
55 right: T)` that merges `right` into `left`. The `merge` crate provides
59 The trait can be used to merge configuration from different sources, for
67 - `derive` (default): Enables the derive macro for the `Merge` trait using the
69 - `num` (default): Enables the merge strategies in the `num` module that
71 - `std` (default): Enables the merge strategies in the `vec` module that
72 require the standard library. If this feature is not set, `merge` is a
82 mail to [~ireas/public-inbox@lists.sr.ht][] using the `[merge-rs]` prefix in
92 `merge-rs` complies with [version 3.0 of the REUSE specification][reuse].