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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! UseCase trait for business operation definitions.
//!
//! Use cases represent specific business operations or user goals within
//! the application. They define what the system can do from a user's perspective
//! and orchestrate domain objects and ports to accomplish their goal.
//! Use cases are similar to InputPort but emphasize the business operation aspect.
//!
//! Revision History
//! - 2025-10-01T00:00:00Z @AI: Initial UseCase trait definition as business operation contract.
/// Trait for use cases that represent business operations.
///
/// Use cases encapsulate the application's business logic and orchestrate
/// domain objects to fulfill specific user goals.
///
/// # Type Parameters
///
/// * `Input` - The input data required to execute the use case
/// * `Output` - The output data produced by the use case
///
/// # Example
///
/// ```rust
/// use hexser::ports::UseCase;
/// use hexser::HexResult;
///
/// struct RegisterUserInput {
/// email: String,
/// password: String,
/// }
///
/// struct RegisterUserOutput {
/// user_id: String,
/// }
///
/// trait RegisterUser: UseCase<RegisterUserInput, RegisterUserOutput> {}
/// ```