Struct gopher_core::codec::ServerCodec
[−]
[src]
pub struct ServerCodec;
A codec for building a Gopher server using tokio-core.
Trait Implementations
impl Codec for ServerCodec
[src]
type In = Frame<GopherRequest, Void, Error>
The type of decoded frames.
type Out = Frame<GopherResponse, EasyBuf, Error>
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, frame: Self::Out, 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