pub trait Collection: Debug {
type Key;
type Value;
// Required methods
fn collection_type() -> CollectionType;
fn collection_trace(trace: Trace) -> CollectionTrace<Self>;
fn update(key: Self::Key, value: Self::Value) -> StateUpdateKind;
// Provided method
fn name() -> String { ... }
}
Expand description
The contents of the catalog are logically separated into separate Collection
s, which
describe the category of data that the content belongs to.
Required Associated Types§
Sourcetype Key
type Key
Type used to stores keys for Collection
.
Sourcetype Value
type Value
Type used to stores values for Collection
.
Required Methods§
Sourcefn collection_type() -> CollectionType
fn collection_type() -> CollectionType
CollectionType
corresponding to Collection
.
Sourcefn collection_trace(trace: Trace) -> CollectionTrace<Self>
fn collection_trace(trace: Trace) -> CollectionTrace<Self>
Extract the CollectionTrace
from a Trace
that corresponds to Collection
.
Sourcefn update(key: Self::Key, value: Self::Value) -> StateUpdateKind
fn update(key: Self::Key, value: Self::Value) -> StateUpdateKind
Generate a StateUpdateKind
with key
and value
that corresponds to Collection
.
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.