Struct BytesCodec
struct BytesCodec(_)
A simple Decoder and Encoder implementation that just ships bytes around.
Example
Turn an AsyncRead into a stream of Result<BytesMut, Error>.
#
use AsyncRead;
use ;
#
#
#
#
# async
Implementations
impl BytesCodec
fn new() -> BytesCodecCreates a new
BytesCodecfor shipping around raw bytes.
impl Clone for BytesCodec
fn clone(self: &Self) -> BytesCodec
impl Copy for BytesCodec
impl Debug for BytesCodec
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Decoder for BytesCodec
fn decode(self: &mut Self, buf: &mut BytesMut) -> Result<Option<BytesMut>, Error>
impl Default for BytesCodec
fn default() -> BytesCodec
impl Encoder for BytesCodec
fn encode(self: &mut Self, data: Bytes, buf: &mut BytesMut) -> Result<(), Error>
impl Encoder for BytesCodec
fn encode(self: &mut Self, data: BytesMut, buf: &mut BytesMut) -> Result<(), Error>
impl Eq for BytesCodec
impl Freeze for BytesCodec
impl Hash for BytesCodec
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl Ord for BytesCodec
fn cmp(self: &Self, other: &BytesCodec) -> Ordering
impl PartialEq for BytesCodec
fn eq(self: &Self, other: &BytesCodec) -> bool
impl PartialOrd for BytesCodec
fn partial_cmp(self: &Self, other: &BytesCodec) -> Option<Ordering>
impl RefUnwindSafe for BytesCodec
impl Send for BytesCodec
impl StructuralPartialEq for BytesCodec
impl Sync for BytesCodec
impl Unpin for BytesCodec
impl UnsafeUnpin for BytesCodec
impl UnwindSafe for BytesCodec
impl<T> Any for BytesCodec
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for BytesCodec
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for BytesCodec
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for BytesCodec
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for BytesCodec
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for BytesCodec
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for BytesCodec
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for BytesCodec
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for BytesCodec
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>