pub trait Keyed {
type Key: Eq + Hash + Clone + Send + 'static;
// Required method
fn key(&self) -> Self::Key;
}Expand description
An item with a stable, owned identity — the merge key
PersistedListModel dedupes and diffs by.
Key is owned (not borrowed, unlike the old MruEntry::Key: ?Sized
shape) because it must be captured into a Patch (crate::flush::Patch)
closure that crosses to the shared I/O worker thread — a borrow into
T cannot outlive the mutation call that produced it.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".