1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! DomainService marker trait for domain operations.
//!
//! Domain services encapsulate domain logic that doesn't naturally belong to
//! an entity or value object. They represent operations that involve multiple
//! aggregates or that don't have a natural home in a specific entity.
//! Domain services contain only domain logic and have no dependencies on infrastructure.
//!
//! Revision History
//! - 2025-10-01T00:00:00Z @AI: Initial DomainService marker trait definition.
/// Marker trait for domain services.
///
/// Domain services contain domain logic that doesn't naturally fit into
/// entities or value objects. They operate on domain concepts and maintain
/// the ubiquitous language of the domain.
///
/// # Example
///
/// ```rust
/// use hexser::domain::DomainService;
/// use hexser::HexResult;
///
/// struct TransferService;
///
/// impl DomainService for TransferService {}
///
/// impl TransferService {
/// fn transfer_funds(
/// &self,
/// from_account: &str,
/// to_account: &str,
/// amount: u64,
/// ) -> HexResult<()> {
/// // Domain logic for transferring funds
/// Ok(())
/// }
/// }
/// ```