pub trait TryMerge<V>: Sealed<V> {
// Required methods
fn try_merge<K, D>(&mut self, value: V) -> Result<(), Error>
where Self: TryApply<V, K, D>,
K: Kind + ?Sized,
D: Dedup + ?Sized;
fn try_merge_self<K, D>(&mut self, another: Self) -> Result<(), Error>
where Self: TryApplySelf<V, K, D> + Sized,
K: Kind + ?Sized,
D: Dedup + ?Sized;
}
Expand description
TryApply
and TryApplySelf
traits’ shim allowing to specify a
parsing Kind
and Dedup
lication strategy as method’s type
parameters.
Required Methods§
sourcefn try_merge<K, D>(&mut self, value: V) -> Result<(), Error>where
Self: TryApply<V, K, D>,
K: Kind + ?Sized,
D: Dedup + ?Sized,
fn try_merge<K, D>(&mut self, value: V) -> Result<(), Error>where Self: TryApply<V, K, D>, K: Kind + ?Sized, D: Dedup + ?Sized,
Merges the provided value
to this field::Container
with the
specified parsing Kind
and Dedup
lication strategy.
Errors
If this field::Container
refuses to apply the value
according
to the Dedup
lication strategy.
sourcefn try_merge_self<K, D>(&mut self, another: Self) -> Result<(), Error>where
Self: TryApplySelf<V, K, D> + Sized,
K: Kind + ?Sized,
D: Dedup + ?Sized,
fn try_merge_self<K, D>(&mut self, another: Self) -> Result<(), Error>where Self: TryApplySelf<V, K, D> + Sized, K: Kind + ?Sized, D: Dedup + ?Sized,
Merges the value extracted from another
field::Container
to
this field::Container
with the specified parsing Kind
and
Dedup
lication strategy.
Errors
If this field::Container
refuses to apply the extracted value
according to the Dedup
lication strategy.