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
//! # External Service Interface
//!
//! This module defines the core interface for external service communication in the Citadel Protocol.
//! It provides a unified way to interact with various external services through a common trait.
//!
//! ## Features
//!
//! * Common interface for external services
//! * Asynchronous data transmission
//! * Error handling with AccountError
//! * Raw packet data support
//! * Peer-to-peer communication
//!
//! ## Usage Example
//!
//! ```rust,no_run
//! use citadel_user::external_services::service_interface::{ExternalServiceChannel, RawExternalPacket};
//! use async_trait::async_trait;
//!
//! struct MyService;
//!
//! #[async_trait]
//! impl ExternalServiceChannel for MyService {
//! async fn send(
//! &mut self,
//! data: RawExternalPacket,
//! session_cid: u64,
//! peer_cid: u64,
//! ) -> Result<(), AccountError> {
//! // Implement service-specific send logic
//! Ok(())
//! }
//! }
//! ```
//!
//! ## Important Notes
//!
//! * Implementations must be thread-safe
//! * Services should handle reconnection
//! * Error handling is standardized
//! * Data format is raw bytes
//!
//! ## Related Components
//!
//! * `RawExternalPacket`: Data packet type
//! * `AccountError`: Error handling type
//! * `async_trait`: Async trait support
//!
use crateAccountError;
use async_trait;
/// The default type for transmitting data
pub type RawExternalPacket = ;
/// An interface for unifying interaction with underlying services