From 1786c9104fe435739386c671dcd918211a810d17 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Sat, 27 Sep 2025 07:35:53 +0200 Subject: [PATCH] feat: add traits to transform self from and to eav --- 01.workspace/heave/src/lib.rs | 2 ++ 01.workspace/heave/src/trt/from_eav.rs | 5 +++++ 01.workspace/heave/src/trt/mod.rs | 3 ++- 01.workspace/heave/src/trt/to_eav.rs | 5 +++++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 01.workspace/heave/src/trt/from_eav.rs create mode 100644 01.workspace/heave/src/trt/to_eav.rs diff --git a/01.workspace/heave/src/lib.rs b/01.workspace/heave/src/lib.rs index 7e685c6..d91f43c 100644 --- a/01.workspace/heave/src/lib.rs +++ b/01.workspace/heave/src/lib.rs @@ -10,3 +10,5 @@ mod tst; pub use crate::str::attribute::O as Attribute; pub use crate::str::entity::O as Entity; pub use crate::str::value::E as Value; +pub use crate::trt::from_eav::T as FromEAV; +pub use crate::trt::to_eav::T as ToEAV; diff --git a/01.workspace/heave/src/trt/from_eav.rs b/01.workspace/heave/src/trt/from_eav.rs new file mode 100644 index 0000000..3b5335a --- /dev/null +++ b/01.workspace/heave/src/trt/from_eav.rs @@ -0,0 +1,5 @@ +use crate::*; + +pub trait T { + fn from_eav(entity: Entity) -> Self; +} diff --git a/01.workspace/heave/src/trt/mod.rs b/01.workspace/heave/src/trt/mod.rs index 8b13789..651c8e9 100644 --- a/01.workspace/heave/src/trt/mod.rs +++ b/01.workspace/heave/src/trt/mod.rs @@ -1 +1,2 @@ - +pub mod from_eav; +pub mod to_eav; diff --git a/01.workspace/heave/src/trt/to_eav.rs b/01.workspace/heave/src/trt/to_eav.rs new file mode 100644 index 0000000..1b33173 --- /dev/null +++ b/01.workspace/heave/src/trt/to_eav.rs @@ -0,0 +1,5 @@ +use crate::*; + +pub trait T { + fn to_eav(self) -> Entity; +}