Skip to main content

qubit_mixin/
lib.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! # Domain Object Mixin Traits
11//!
12//! This library provides a series of mixin traits for adding common
13//! properties and behaviors to domain objects. These traits follow the
14//! composition-over-inheritance design principle, allowing domain objects
15//! to acquire desired functionality by implementing different trait
16//! combinations.
17//!
18//! # Main Features
19//!
20//! - **Timestamp Traits**: Manage creation, modification, and deletion
21//!   times
22//! - **Identifier Traits**: Provide identification information such as ID,
23//!   code, and name
24//! - **State Management Traits**: Manage status, visibility, and other
25//!   states
26//! - **User Information Traits**: Provide user-related information such as
27//!   username, email, and password
28//! - **Entity Association Traits**: Manage entity associations
29//! - **Validation and Normalization**: Provide data validation and
30//!   normalization functionality
31//!
32
33pub mod auditable;
34pub mod creatable;
35pub mod data_with_max_age;
36pub mod deletable;
37pub mod desensitizable;
38pub mod emptyful;
39pub mod has_info;
40pub mod has_info_with_entity;
41pub mod has_specific_info;
42pub mod identifiable;
43pub mod info;
44pub mod info_with_entity;
45pub mod modifiable;
46pub mod normalizable;
47pub mod predefinable;
48pub mod validatable;
49pub mod with_birthday;
50pub mod with_code;
51pub mod with_comment;
52pub mod with_email;
53pub mod with_entity;
54pub mod with_index;
55pub mod with_key;
56pub mod with_name;
57pub mod with_password;
58pub mod with_security_key;
59pub mod with_status;
60pub mod with_udid;
61pub mod with_username;
62pub mod with_uuid;
63pub mod with_visibility;
64
65// Re-export main traits
66pub use auditable::Auditable;
67pub use creatable::Creatable;
68pub use data_with_max_age::DataWithMaxAge;
69pub use deletable::Deletable;
70pub use desensitizable::Desensitizable;
71pub use emptyful::Emptyful;
72pub use has_info::HasInfo;
73pub use has_info_with_entity::HasInfoWithEntity;
74pub use has_specific_info::HasSpecificInfo;
75pub use identifiable::Identifiable;
76pub use info::Info;
77pub use info_with_entity::InfoWithEntity;
78pub use modifiable::Modifiable;
79pub use normalizable::Normalizable;
80pub use predefinable::Predefinable;
81pub use validatable::Validatable;
82pub use with_birthday::WithBirthday;
83pub use with_code::WithCode;
84pub use with_comment::WithComment;
85pub use with_email::WithEmail;
86pub use with_entity::WithEntity;
87pub use with_index::WithIndex;
88pub use with_key::WithKey;
89pub use with_name::WithName;
90pub use with_password::WithPassword;
91pub use with_security_key::WithSecurityKey;
92pub use with_status::WithStatus;
93pub use with_udid::WithUdid;
94pub use with_username::WithUsername;
95pub use with_uuid::WithUuid;
96pub use with_visibility::WithVisibility;