pub trait DMSCProtocolConnection {
// Required methods
fn connection_id(&self) -> &str;
fn remote_device_id(&self) -> &str;
fn protocol_type(&self) -> DMSCProtocolType;
fn is_active(&self) -> bool;
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn receive<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_stats(&self) -> DMSCConnectionStats;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Protocol connection trait
Required Methods§
Sourcefn connection_id(&self) -> &str
fn connection_id(&self) -> &str
Get connection ID
Sourcefn remote_device_id(&self) -> &str
fn remote_device_id(&self) -> &str
Get remote device ID
Sourcefn protocol_type(&self) -> DMSCProtocolType
fn protocol_type(&self) -> DMSCProtocolType
Get protocol type
Sourcefn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send data
Sourcefn receive<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn receive<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Receive data
Sourcefn get_stats(&self) -> DMSCConnectionStats
fn get_stats(&self) -> DMSCConnectionStats
Get statistics