Skip to main content

EntityKey

Trait EntityKey 

Source
pub trait EntityKey {
    type Key: Copy + Debug + Eq + Ord + FieldValue + EntityKeyBytes + 'static;
}
Expand description

EntityKey

Associates an entity with the primitive type used as its primary key.

§Semantics

  • Implemented for entity types
  • Self::Key is the storage representation of the primary key
  • Keys are plain values (Ulid, u64, Principal, …)
  • Typed identity is provided by Id<Self>, not by the key itself
  • Keys are public identifiers and are never authority-bearing capabilities

Required Associated Types§

Source

type Key: Copy + Debug + Eq + Ord + FieldValue + EntityKeyBytes + 'static

Implementors§