Struct framecodecs::remote_addr::RemoteAddrCodec
[−]
[src]
pub struct RemoteAddrCodec<C, Kind> { /* fields omitted */ }
Protocol codec used by RemoteAddrProto
.
Methods
impl<C, Kind> RemoteAddrCodec<C, Kind>
[src]
fn new(inner: C, peer_addr: SocketAddr) -> Self
Trait Implementations
impl<C> Codec for RemoteAddrCodec<C, Pipeline> where C: Codec
[src]
type In = (SocketAddr, C::In)
The type of decoded frames.
type Out = C::Out
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, item: 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
impl<C, In, Out> Codec for RemoteAddrCodec<C, Multiplex> where C: Codec<In=(RequestId, In), Out=(RequestId, Out)>
[src]
type In = (RequestId, (SocketAddr, In))
The type of decoded frames.
type Out = (RequestId, Out)
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, item: 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