Struct framecodecs::request_id_field::RequestIdFieldCodec
[−]
[src]
pub struct RequestIdFieldCodec<B, C> { /* fields omitted */ }
Protocol codec used by RequestIdFieldProto
.
Methods
impl<B, C> RequestIdFieldCodec<B, C>
[src]
fn new(base: C) -> Self
Trait Implementations
impl<B: Debug, C: Debug> Debug for RequestIdFieldCodec<B, C>
[src]
impl<B: Clone, C: Clone> Clone for RequestIdFieldCodec<B, C>
[src]
fn clone(&self) -> RequestIdFieldCodec<B, C>
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<B: Default, C: Default> Default for RequestIdFieldCodec<B, C>
[src]
fn default() -> RequestIdFieldCodec<B, C>
Returns the "default value" for a type. Read more
impl<B, C> Codec for RequestIdFieldCodec<B, C> where B: ByteOrder, C: Codec
[src]
type In = (RequestId, C::In)
The type of decoded frames.
type Out = (RequestId, C::Out)
The type of frames to be encoded.
fn decode(&mut self, buf: &mut EasyBuf) -> Result<Option<(RequestId, C::In)>>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn encode(&mut self,
(reqid, msg): (RequestId, C::Out),
buf: &mut Vec<u8>)
-> Result<()>
(reqid, msg): (RequestId, C::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