doc: add doc comments to EAV trait
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
use crate::*;
|
use crate::*;
|
||||||
|
|
||||||
/// TODO: INSERT DOCUMENTATION HERE
|
/// A trait for types that can be represented as an Entity-Attribute-Value model.
|
||||||
pub trait T where
|
///
|
||||||
|
/// 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<Entity>,
|
Self: From<Entity>,
|
||||||
Self: Into<Entity>,
|
Self: Into<Entity>,
|
||||||
{
|
{
|
||||||
|
/// Returns the class name of the type.
|
||||||
|
///
|
||||||
|
/// This is used to distinguish between different types of entities in the database.
|
||||||
fn class() -> &'static str;
|
fn class() -> &'static str;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[cfg(test)]
|
|
||||||
// mod unit_tests {}
|
|
||||||
Reference in New Issue
Block a user