Struct framecodecs::delimiter::DelimiterCodec
[−]
[src]
pub struct DelimiterCodec<D>(_);
Protocol codec used by DelimiterProto
.
Methods
impl<D> DelimiterCodec<D>
[src]
fn new(delimiter: D) -> DelimiterCodec<D>
Trait Implementations
impl<D: Debug> Debug for DelimiterCodec<D>
[src]
impl<D: Clone> Clone for DelimiterCodec<D>
[src]
fn clone(&self) -> DelimiterCodec<D>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<D> Codec for DelimiterCodec<D> where D: Delimiter + Clone
[src]
type In = Vec<u8>
The type of decoded frames.
type Out = Vec<u8>
The type of frames to be encoded.
fn decode(&mut self, buf: &mut EasyBuf) -> Result<Option<Vec<u8>>>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn encode(&mut self, item: Vec<u8>, buf: &mut Vec<u8>) -> Result<()>
Encodes a frame into the buffer provided. Read more
fn decode_eof(&mut self, buf: &mut EasyBuf) -> Result<Self::In, Error>
A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more