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
//! Adapter marker trait for port implementations.
//!
//! Adapters implement ports using specific technologies or frameworks.
//! They act as a bridge between the application core and external systems,
//! translating between domain concepts and infrastructure concerns.
//! This trait serves as a marker to identify adapter components in the architecture.
//!
//! Revision History
//! - 2025-10-01T00:00:00Z @AI: Initial Adapter marker trait definition.
/// Marker trait for adapters that implement ports.
///
/// Adapters provide concrete implementations of port interfaces using
/// specific technologies, frameworks, or external systems.
///
/// # Example
///
/// ```rust
/// use hexser::adapters::Adapter;
/// use hexser::ports::Repository;
/// use hexser::HexEntity;
/// use hexser::HexResult;
///
/// struct User {
/// id: String,
/// }
///
/// impl HexEntity for User {
/// type Id = String;
/// }
///
/// struct PostgresUserRepository {
/// // Database connection
/// }
///
/// impl Adapter for PostgresUserRepository {}
///
/// // Would also implement Repository<User> for PostgresUserRepository
/// ```