pub trait TryMerge<V>: Sealed<V> {
// Required methods
fn try_merge<K, D>(&mut self, value: V) -> Result<()>
where Self: TryApply<V, K, D>,
K: Kind + ?Sized,
D: Dedup + ?Sized;
fn try_merge_self<K, D>(&mut self, another: Self) -> Result<()>
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§
Sourcefn try_merge<K, D>(&mut self, value: V) -> Result<()>
fn try_merge<K, D>(&mut self, value: V) -> Result<()>
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.
Sourcefn try_merge_self<K, D>(&mut self, another: Self) -> Result<()>
fn try_merge_self<K, D>(&mut self, another: Self) -> Result<()>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.