pub trait Table:
Send
+ Sync
+ Debug
+ 'static {
type Key: Key;
type Value: Value;
const NAME: &'static str;
}
Expand description
Generic trait that a database table should follow.
The Table::Key
and Table::Value
types should implement Encode
and
Decode
when appropriate. These traits define how the data is stored and read from the
database.
It allows for the use of codecs. See crate::models::ShardedKey
for a custom
implementation.
Required Associated Constants§
Required Associated Types§
Object Safety§
This trait is not object safe.