pub trait EntityCreator: Send + Sync {
// Required method
fn create_from_json<'life0, 'async_trait>(
&'life0 self,
entity_data: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn update_from_json<'life0, 'life1, 'async_trait>(
&'life0 self,
_entity_id: &'life1 Uuid,
_entity_data: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_entity_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for creating entities dynamically
This allows the link system to create new entities with automatic linking without knowing the concrete entity types at compile time.