Trait synthez_core::parse::attrs::field::TryMerge [−][src]
pub trait TryMerge<V>: Sealed<V> {
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 Dedup
lication strategy as method’s type
parameters.
Required methods
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.
fn try_merge_self<K, D>(&mut self, another: Self) -> Result<()> where
Self: TryApplySelf<V, K, D> + Sized,
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,
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.