Trait tokio_proto::streaming::multiplex::advanced::Dispatch [] [src]

pub trait Dispatch {
    type Io;
    type In;
    type BodyIn;
    type Out;
    type BodyOut;
    type Error: From<Error>;
    type Stream: Stream<Item=Self::BodyIn, Error=Self::Error>;
    type Transport: Transport<Self::BodyOut, Item=Frame<Self::Out, Self::BodyOut, Self::Error>, SinkItem=Frame<Self::In, Self::BodyIn, Self::Error>>;
    fn transport(&mut self) -> &mut Self::Transport;
    fn poll(&mut self)
        -> Poll<Option<MultiplexMessage<Self::In, Self::Stream, Self::Error>>, Error>; fn poll_ready(&self) -> Async<()>; fn dispatch(&mut self,
            message: MultiplexMessage<Self::Out, Body<Self::BodyOut, Self::Error>, Self::Error>)
            -> Result<()>; fn cancel(&mut self, request_id: RequestId) -> Result<()>; }

Dispatch messages from the transport to the service

Associated Types

Type of underlying I/O object

Messages written to the transport

Inbound body frame

Messages read from the transport

Outbound body frame

Transport error

Inbound body stream type

Transport type

Required Methods

Mutable reference to the transport

Poll the next available message

The Dispatch is ready to accept another message

Process an out message

Cancel interest in the exchange identified by RequestId

Implementors