Trait gear_common::storage::CountedByKey
source · pub trait CountedByKey {
type Key;
type Length: Default + PartialEq;
// Required method
fn len(key: &Self::Key) -> Self::Length;
// Provided method
fn is_empty(key: &Self::Key) -> bool { ... }
}
Expand description
Represents default counting logic, by providing ability to return length of the object as specified (associated) type or answer the question is the object empty, by provided key of specified (associated) type.
Should be implemented on double map based types.
Required Associated Types§
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.