Struct framecodecs::request_id_field::RequestIdFieldProto
[−]
[src]
pub struct RequestIdFieldProto<B, C> { /* fields omitted */ }
A protocol that converts a pipelining codec into a multiplexing codec by prepending a u64
request id field
to every frame of the base codec.
Methods
impl<B, C> RequestIdFieldProto<B, C> where C: Codec + Clone
[src]
fn new(base: C) -> Self
Creates a new RequestIdFieldProto
from a base codec.
Trait Implementations
impl<B: Debug, C: Debug> Debug for RequestIdFieldProto<B, C>
[src]
impl<B: Default, C: Default> Default for RequestIdFieldProto<B, C>
[src]
fn default() -> RequestIdFieldProto<B, C>
Returns the "default value" for a type. Read more
impl<B: Clone, C: Clone> Clone for RequestIdFieldProto<B, C>
[src]
fn clone(&self) -> RequestIdFieldProto<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, C, T> ClientProto<T> for RequestIdFieldProto<B, C> where C: Codec + Clone + 'static,
B: ByteOrder + 'static,
T: Io + 'static
[src]
B: ByteOrder + 'static,
T: Io + 'static
type Request = C::Out
Request messages.
type Response = C::In
Response messages.
type Error = Error
Errors produced by the service.
type Transport = Framed<T, RequestIdFieldCodec<B, C>>
The message transport, which usually take T
as a parameter. Read more
type BindTransport = Result<Self::Transport>
A future for initializing a transport from an I/O object. Read more
fn bind_transport(&self, io: T) -> Self::BindTransport
Build a transport from the given I/O object, using self
for any configuration. Read more
impl<B, C, T> ServerProto<T> for RequestIdFieldProto<B, C> where C: Codec + Clone + 'static,
B: ByteOrder + 'static,
T: Io + 'static
[src]
B: ByteOrder + 'static,
T: Io + 'static
type Request = C::In
Request messages.
type Response = C::Out
Response messages.
type Error = Error
Errors produced by the service.
type Transport = Framed<T, RequestIdFieldCodec<B, C>>
The message transport, which usually take T
as a parameter. Read more
type BindTransport = Result<Self::Transport>
A future for initializing a transport from an I/O object. Read more
fn bind_transport(&self, io: T) -> Self::BindTransport
Build a transport from the given I/O object, using self
for any configuration. Read more