Struct eventstore_tcp::codec::PackageCodec
[−]
[src]
pub struct PackageCodec;
Stateless simple PackageCodec
Trait Implementations
impl Codec for PackageCodec
[src]
type In = Package
The type of decoded frames.
type Out = Package
The type of frames to be encoded.
fn decode(&mut self, buf: &mut EasyBuf) -> Result<Option<Self::In>>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn encode(&mut self, msg: Package, 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