pub struct BytesCodec;
Expand description
The default byte encoder/decoder; using this is no different from directly using a TCP reliable.
Trait Implementations§
Source§impl Decoder for BytesCodec
impl Decoder for BytesCodec
fn decode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
read: &'life1 mut OwnedReadHalf,
src: &'life2 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn try_decode( &mut self, _read: &mut OwnedReadHalf, _src: &mut [u8], ) -> Result<usize>
Source§impl Encoder for BytesCodec
impl Encoder for BytesCodec
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,
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,
Auto Trait Implementations§
impl Freeze for BytesCodec
impl RefUnwindSafe for BytesCodec
impl Send for BytesCodec
impl Sync for BytesCodec
impl Unpin for BytesCodec
impl UnwindSafe for BytesCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more