pub trait Amalgamate {
type Key: Hash + Eq;
// Required methods
fn key(&self) -> Self::Key;
fn amalgamate(&mut self, other: Self);
}Expand description
Describes how an object can be combined with another object based on some criteria.
Required Associated Types§
Required Methods§
Sourcefn key(&self) -> Self::Key
fn key(&self) -> Self::Key
Constructs the key that will be used to determine if two elements should be combined.
Sourcefn amalgamate(&mut self, other: Self)
fn amalgamate(&mut self, other: Self)
Determines if two elements should be combined.
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.