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>>;
// Required methods
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;
}
Expand description
Dispatch messages from the transport to the service
Required Associated Types§
Required Methods§
Sourcefn dispatch(
&mut self,
message: PipelineMessage<Self::Out, Body<Self::BodyOut, Self::Error>, Self::Error>,
) -> Result<()>
fn dispatch( &mut self, message: PipelineMessage<Self::Out, Body<Self::BodyOut, Self::Error>, Self::Error>, ) -> Result<()>
Process an out message
Sourcefn poll(
&mut self,
) -> Poll<Option<PipelineMessage<Self::In, Self::Stream, Self::Error>>, Error>
fn poll( &mut self, ) -> Poll<Option<PipelineMessage<Self::In, Self::Stream, Self::Error>>, Error>
Poll the next completed message
Sourcefn has_in_flight(&self) -> bool
fn has_in_flight(&self) -> bool
RPC currently in flight TODO: Get rid of