pub trait Table: Serialize + DeserializeOwned {
type Key: PartialOrd + Serialize + DeserializeOwned;
const NAME: &'static str;
const VERSION: u8;
}
Expand description
Types which should be stored.
Required Associated Constants§
Required Associated Types§
Sourcetype Key: PartialOrd + Serialize + DeserializeOwned
type Key: PartialOrd + Serialize + DeserializeOwned
Primary key of the table. If this type is sane, then it should have same ordering in rust as it does in its bincode serialized form. Simply - Fields sorted in-order numeric values sorted naturally, and strings lexicographically.
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.