pub trait Meta:
Debug
+ Clone
+ PartialEq
+ Default {
// Required methods
fn is_empty(&self) -> bool;
fn compose(&mut self, other: &Self, type_pair: (DeltaType, DeltaType));
fn is_mergeable(&self, other: &Self) -> bool;
fn merge(&mut self, other: &Self);
// Provided methods
fn empty() -> Self { ... }
fn take(&mut self, other: &Self) -> Self { ... }
}
Expand description
The metadata of a DeltaItem If empty metadata is used to override the older one, we will remove the metadata into None
Required Methods§
fn is_empty(&self) -> bool
Sourcefn compose(&mut self, other: &Self, type_pair: (DeltaType, DeltaType))
fn compose(&mut self, other: &Self, type_pair: (DeltaType, DeltaType))
this is used when composing two DeltaItems with the same length
fn is_mergeable(&self, other: &Self) -> bool
Sourcefn merge(&mut self, other: &Self)
fn merge(&mut self, other: &Self)
This is used when we merge two DeltaItems. And it’s guaranteed that Meta::is_mergeable is true
Provided Methods§
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.