pub trait AsyncTransport {
// Required methods
fn process_data<'life0, 'life1, 'life2, 'async_trait, R>(
&'life0 mut self,
read: &'life1 mut R,
settings: &'life2 Settings,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where R: 'async_trait + AsyncRead + Send + Unpin,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn receive_raw_packet<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_raw_packet<'life0, 'life1, 'life2, 'life3, 'async_trait, W>(
&'life0 mut self,
write: &'life1 mut W,
packet: &'life2 [u8],
settings: &'life3 Settings,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where W: 'async_trait + AsyncWrite + Send + Unpin,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}
Required Methods§
fn process_data<'life0, 'life1, 'life2, 'async_trait, R>( &'life0 mut self, read: &'life1 mut R, settings: &'life2 Settings, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
fn receive_raw_packet<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_raw_packet<'life0, 'life1, 'life2, 'life3, 'async_trait, W>(
&'life0 mut self,
write: &'life1 mut W,
packet: &'life2 [u8],
settings: &'life3 Settings,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + Send + Unpin,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.