From 5ec071ce63b3ffcd46d7af0c792c28921358bf41 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Thu, 9 Oct 2025 15:33:45 +0200 Subject: [PATCH] doc: add doc comments to EAV trait --- 01.workspace/heave/src/trt/eav.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/01.workspace/heave/src/trt/eav.rs b/01.workspace/heave/src/trt/eav.rs index 05a0267..bff485e 100644 --- a/01.workspace/heave/src/trt/eav.rs +++ b/01.workspace/heave/src/trt/eav.rs @@ -1,12 +1,16 @@ use crate::*; -/// TODO: INSERT DOCUMENTATION HERE -pub trait T where +/// A trait for types that can be represented as an Entity-Attribute-Value model. +/// +/// This trait provides the necessary conversions to and from the generic `Entity` +/// representation, and it requires the type to define its own class name. +pub trait T +where Self: From, Self: Into, { + /// Returns the class name of the type. + /// + /// This is used to distinguish between different types of entities in the database. fn class() -> &'static str; -} - -// #[cfg(test)] -// mod unit_tests {} +} \ No newline at end of file