DMSCProtocol

Trait DMSCProtocol 

Source
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§

Source

fn protocol_type(&self) -> DMSCProtocolType

Get protocol type

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn get_stats(&self) -> DMSCProtocolStats

Get protocol statistics

Source

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

Source

fn shutdown<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shutdown protocol

Implementors§