Trait tokio_proto::streaming::pipeline::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<Item = Frame<Self::Out, Self::BodyOut, Self::Error>, SinkItem = Frame<Self::In, Self::BodyIn, Self::Error>>; fn transport(&mut self) -> &mut Self::Transport; fn dispatch(
&mut self,
message: PipelineMessage<Self::Out, Body<Self::BodyOut, Self::Error>, Self::Error>
) -> Result<()>; fn poll(
&mut self
) -> Poll<Option<PipelineMessage<Self::In, Self::Stream, Self::Error>>, Error>; fn has_in_flight(&self) -> bool; }
Dispatch messages from the transport to the service
Associated Types
type Io
Type of underlying I/O object
type In
Message written to transport
type BodyIn
Body written to transport
type Out
Messages read from the transport
type BodyOut
Outbound body frame
type Error: From<Error>
Transport error
type Stream: Stream<Item = Self::BodyIn, Error = Self::Error>
Body stream written to transport
type Transport: Transport<Item = Frame<Self::Out, Self::BodyOut, Self::Error>, SinkItem = Frame<Self::In, Self::BodyIn, Self::Error>>
Transport type
Required Methods
fn transport(&mut self) -> &mut Self::Transport
Mutable reference to the transport
fn dispatch(
&mut self,
message: PipelineMessage<Self::Out, Body<Self::BodyOut, Self::Error>, Self::Error>
) -> Result<()>
&mut self,
message: PipelineMessage<Self::Out, Body<Self::BodyOut, Self::Error>, Self::Error>
) -> Result<()>
Process an out message
fn poll(
&mut self
) -> Poll<Option<PipelineMessage<Self::In, Self::Stream, Self::Error>>, Error>
&mut self
) -> Poll<Option<PipelineMessage<Self::In, Self::Stream, Self::Error>>, Error>
Poll the next completed message
fn has_in_flight(&self) -> bool
RPC currently in flight TODO: Get rid of