pub trait EntityKind:
Kind
+ TypeKind
+ FieldValues {
type PrimaryKey: Copy + Into<Key>;
type Store: StoreKind;
type Canister: CanisterKind;
const ENTITY_NAME: &'static str;
const PRIMARY_KEY: &'static str;
const FIELDS: &'static [&'static str];
const INDEXES: &'static [&'static IndexModel];
const MODEL: &'static EntityModel;
// Required methods
fn key(&self) -> Key;
fn primary_key(&self) -> Self::PrimaryKey;
fn set_primary_key(&mut self, key: Self::PrimaryKey);
}Expand description
EntityKind
Required Associated Constants§
const ENTITY_NAME: &'static str
const PRIMARY_KEY: &'static str
const FIELDS: &'static [&'static str]
const INDEXES: &'static [&'static IndexModel]
const MODEL: &'static EntityModel
Required Associated Types§
Required Methods§
fn key(&self) -> Key
fn primary_key(&self) -> Self::PrimaryKey
fn set_primary_key(&mut self, key: Self::PrimaryKey)
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.