Skip to main content

Entity

Trait Entity 

Source
pub trait Entity: Debug + Clone {
    type Id: Debug + Clone + PartialEq;

    // Required methods
    fn entity_id(&self) -> &Self::Id;
    fn entity_type() -> &'static str;
}
Expand description

Trait for domain entities

All generated entities implement this trait, providing a common interface for working with domain objects.

Required Associated Types§

Source

type Id: Debug + Clone + PartialEq

The type of the entity’s unique identifier

Required Methods§

Source

fn entity_id(&self) -> &Self::Id

Get the entity’s unique identifier

Source

fn entity_type() -> &'static str

Get the entity type name

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Entity for Bin

Source§

impl Entity for DeliveryNote

Source§

impl Entity for DeliveryNoteItem

Source§

impl Entity for InventoryCompanySetting

Source§

impl Entity for LandedCost

Source§

impl Entity for LandedCostAdjustmentLine

Source§

impl Entity for LandedCostLine

Source§

impl Entity for Location

Source§

impl Entity for Lot

Source§

impl Entity for OperationType

Source§

impl Entity for Package

Source§

impl Entity for PackageType

Source§

impl Entity for PickingBatch

Source§

impl Entity for PurchaseReceipt

Source§

impl Entity for PurchaseReceiptItem

Source§

impl Entity for PutawayRule

Source§

impl Entity for Quant

Source§

impl Entity for ReorderingRule

Source§

impl Entity for Route

Source§

impl Entity for RouteRule

Source§

impl Entity for Scrap

Source§

impl Entity for ScrapReasonTag

Source§

impl Entity for StockEntry

Source§

impl Entity for StockEntryItem

Source§

impl Entity for StockItem

Source§

impl Entity for StockLedgerEntry

Source§

impl Entity for StockMove

Source§

impl Entity for StockMoveLine

Source§

impl Entity for StockReconciliation

Source§

impl Entity for StockReconciliationItem

Source§

impl Entity for StorageCategory

Source§

impl Entity for StorageCategoryCapacity

Source§

impl Entity for Transfer

Source§

impl Entity for Warehouse