Struct tokio::codec::BytesCodec
source · [−]pub struct BytesCodec(_);
Expand description
A simple Codec
implementation that just ships bytes around.
Implementations
sourceimpl BytesCodec
impl BytesCodec
sourcepub fn new() -> BytesCodec
pub fn new() -> BytesCodec
Creates a new BytesCodec
for shipping around raw bytes.
Trait Implementations
sourceimpl Clone for BytesCodec
impl Clone for BytesCodec
sourcepub fn clone(&self) -> BytesCodec
pub fn clone(&self) -> BytesCodec
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BytesCodec
impl Debug for BytesCodec
sourceimpl Decoder for BytesCodec
impl Decoder for BytesCodec
sourcepub fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<BytesMut>, Error>
pub fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<BytesMut>, Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
sourceimpl Encoder for BytesCodec
impl Encoder for BytesCodec
sourceimpl Hash for BytesCodec
impl Hash for BytesCodec
sourceimpl Ord for BytesCodec
impl Ord for BytesCodec
sourceimpl PartialEq<BytesCodec> for BytesCodec
impl PartialEq<BytesCodec> for BytesCodec
sourcepub fn eq(&self, other: &BytesCodec) -> bool
pub fn eq(&self, other: &BytesCodec) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &BytesCodec) -> bool
pub fn ne(&self, other: &BytesCodec) -> bool
This method tests for !=
.
sourceimpl PartialOrd<BytesCodec> for BytesCodec
impl PartialOrd<BytesCodec> for BytesCodec
sourcepub fn partial_cmp(&self, other: &BytesCodec) -> Option<Ordering>
pub fn partial_cmp(&self, other: &BytesCodec) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for BytesCodec
impl Eq for BytesCodec
impl StructuralEq for BytesCodec
impl StructuralPartialEq for BytesCodec
Auto Trait Implementations
impl RefUnwindSafe for BytesCodec
impl Send for BytesCodec
impl Sync for BytesCodec
impl Unpin for BytesCodec
impl UnwindSafe for BytesCodec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more