Crate entity_core

Crate entity_core 

Source
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 traits
  • Pagination — Common pagination parameters
  • prelude — 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.
transaction
Transaction support for entity-derive.

Structs§

Pagination
Pagination parameters for list operations.

Enums§

CommandKind
Kind of business command.
EventKind
Kind of lifecycle event.
SortDirection
Sort direction for ordered queries.

Traits§

EntityCommand
Base trait for entity commands.
EntityEvent
Base trait for entity lifecycle events.
Repository
Base repository trait.

Attribute Macros§

async_trait
Re-export async_trait for generated code.