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 Deduplication strategy as method’s type parameters.

Required Methods§

source

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 Deduplication strategy.

Errors

If this field::Container refuses to apply the value according to the Deduplication strategy.

source

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 Deduplication strategy.

Errors

If this field::Container refuses to apply the extracted value according to the Deduplication strategy.

Implementors§

source§

impl<T, V> TryMerge<V> for Twhere T: ?Sized,