feat: add super trait EAV
This commit is contained in:
@@ -10,6 +10,7 @@ mod tst;
|
|||||||
pub use crate::str::attribute::O as Attribute;
|
pub use crate::str::attribute::O as Attribute;
|
||||||
pub use crate::str::entity::O as Entity;
|
pub use crate::str::entity::O as Entity;
|
||||||
pub use crate::str::value::E as Value;
|
pub use crate::str::value::E as Value;
|
||||||
|
pub use crate::trt::eav::T as EAV;
|
||||||
pub use crate::trt::from_eav::T as FromEAV;
|
pub use crate::trt::from_eav::T as FromEAV;
|
||||||
pub use crate::trt::to_eav::T as ToEAV;
|
pub use crate::trt::to_eav::T as ToEAV;
|
||||||
pub use crate::trt::to_value::T as ToValue;
|
pub use crate::trt::to_value::T as ToValue;
|
||||||
|
|||||||
11
01.workspace/heave/src/trt/eav.rs
Normal file
11
01.workspace/heave/src/trt/eav.rs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
use crate::*;
|
||||||
|
|
||||||
|
/// TODO: INSERT DOCUMENTATION HERE
|
||||||
|
pub trait T where
|
||||||
|
Self: FromEAV,
|
||||||
|
Self: ToEAV,
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// #[cfg(test)]
|
||||||
|
// mod unit_tests {}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
pub mod eav;
|
||||||
pub mod from_eav;
|
pub mod from_eav;
|
||||||
pub mod to_eav;
|
pub mod to_eav;
|
||||||
pub mod to_value;
|
pub mod to_value;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ mod tests {
|
|||||||
pub name: String,
|
pub name: String,
|
||||||
pub price: u64,
|
pub price: u64,
|
||||||
}
|
}
|
||||||
|
impl EAV for Product {}
|
||||||
impl ToEAV for Product {
|
impl ToEAV for Product {
|
||||||
fn to_eav(self) -> Entity {
|
fn to_eav(self) -> Entity {
|
||||||
Entity::default()
|
Entity::default()
|
||||||
|
|||||||
Reference in New Issue
Block a user