pub trait EntityStore: Send + Sync {
// Required methods
fn upsert_entity(&self, entity: &Entity) -> Result<u64, ZerError>;
fn get_entity(&self, id: u64) -> Result<Entity, ZerError>;
fn record_to_entity(&self, record_id: u64) -> Result<Option<u64>, ZerError>;
fn all_entities(&self) -> Result<Vec<Entity>, ZerError>;
}Expand description
Persistent store for resolved entities.
Required Methods§
fn upsert_entity(&self, entity: &Entity) -> Result<u64, ZerError>
fn get_entity(&self, id: u64) -> Result<Entity, ZerError>
fn record_to_entity(&self, record_id: u64) -> Result<Option<u64>, ZerError>
fn all_entities(&self) -> Result<Vec<Entity>, ZerError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".