rust_p2p_core::pipe::tcp_pipeTrait Encoder
source pub trait Encoder: Send + Sync {
// Required method
fn encode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
write: &'life1 mut OwnedWriteHalf,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn encode_multiple<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
write: &'life1 mut OwnedWriteHalf,
bufs: &'life2 [IoSlice<'life3>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}