toql_core/table_mapper/mapped.rs
1//! `structs that implement this trait, can directly be mapped.
2use super::TableMapper;
3
4/// This trait is implemented for every Toql derived `struct`.
5/// See documentation on [TableMapper] to see how it is used.
6pub trait Mapped {
7 fn table_name() -> String;
8 fn table_alias() -> String;
9 fn type_name() -> String;
10 fn map(mapper: &mut TableMapper) -> crate::result::Result<()>; // Map entity fields
11}