pub trait DMSCProtocol {
// Required methods
fn protocol_type(&self) -> DMSCProtocolType;
fn is_ready<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
config: DMSCProtocolConfig,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
target: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn send_message_with_flags<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
target: &'life1 str,
data: &'life2 [u8],
flags: DMSCMessageFlags,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn receive_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_connection_info<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCConnectionInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn close_connection<'life0, 'life1, 'async_trait>(
&'life0 mut self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_stats(&self) -> DMSCProtocolStats;
fn get_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCProtocolHealth> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Core protocol trait
Required Methods§
Sourcefn protocol_type(&self) -> DMSCProtocolType
fn protocol_type(&self) -> DMSCProtocolType
Get protocol type
Sourcefn is_ready<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_ready<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if protocol is ready
Sourcefn initialize<'life0, 'async_trait>(
&'life0 mut self,
config: DMSCProtocolConfig,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
config: DMSCProtocolConfig,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize protocol
Sourcefn send_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
target: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
target: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send message
Sourcefn send_message_with_flags<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
target: &'life1 str,
data: &'life2 [u8],
flags: DMSCMessageFlags,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_message_with_flags<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
target: &'life1 str,
data: &'life2 [u8],
flags: DMSCMessageFlags,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send message with flags
Sourcefn receive_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive message
Sourcefn get_connection_info<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCConnectionInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_connection_info<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCConnectionInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get connection info
Sourcefn close_connection<'life0, 'life1, 'async_trait>(
&'life0 mut self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close_connection<'life0, 'life1, 'async_trait>(
&'life0 mut self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Close connection
Sourcefn get_stats(&self) -> DMSCProtocolStats
fn get_stats(&self) -> DMSCProtocolStats
Get protocol statistics
Sourcefn get_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCProtocolHealth> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCProtocolHealth> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get protocol health