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§
- outbox
- Transactional-outbox drainer runtime.
- policy
- Policy/authorization types for entity-derive.
- prelude
- Convenient re-exports for common usage.
- schema
- Runtime schema assertion for derived entities.
- serde_
helpers - Serde helpers for generated DTOs.
- stream
- Streaming types for real-time entity updates.
- transaction
- Transaction support for entity-derive.
Structs§
- Constraint
Error - A database constraint violation resolved to entity metadata.
- Pagination
- Pagination parameters for list operations.
- Transition
Error - A state-machine transition was attempted from a status it is not declared for.
Enums§
- Command
Kind - Kind of business command.
- Constraint
Kind - Kind of database constraint that was violated.
- 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.
Functions§
- const_
str_ eq - Compare two strings in const context.
Attribute Macros§
- async_
trait - Re-export
async_traitfor generated code.