Expand description
Core traits and types for entity-derive.
This crate provides the foundational traits and types used by entity-derive generated code. It can also be used standalone for manual implementations.
§Overview
Repository— Base trait for all generated repository traitsPagination— Common pagination parametersprelude— Convenient re-exports
§Usage
Most users should use entity-derive directly, which re-exports this crate.
For manual implementations:
ⓘ
use entity_core::prelude::*;
#[async_trait]
impl UserRepository for MyPool {
type Error = MyError;
type Pool = PgPool;
// ...
}Modules§
- policy
- Policy/authorization types for entity-derive.
- prelude
- Convenient re-exports for common usage.
- stream
- Streaming types for real-time entity updates.
Structs§
- Pagination
- Pagination parameters for list operations.
Enums§
- Command
Kind - Kind of business command.
- Event
Kind - Kind of lifecycle event.
- Sort
Direction - Sort direction for ordered queries.
Traits§
- Entity
Command - Base trait for entity commands.
- Entity
Event - Base trait for entity lifecycle events.
- Repository
- Base repository trait.
Attribute Macros§
- async_
trait - Re-export async_trait for generated code.