tokio_proto::streaming::pipeline

Struct StreamingPipeline

Source
pub struct StreamingPipeline<B>(/* private fields */);
Expand description

A marker used to flag protocols as being streaming and pipelined.

This is an implementation detail; to actually implement a protocol, implement the ClientProto or ServerProto traits in this module.

Trait Implementations§

Source§

impl<P, T, B> BindClient<StreamingPipeline<B>, T> for P
where P: ClientProto<T>, T: 'static, B: Stream<Item = P::RequestBody, Error = P::Error> + 'static,

Source§

type ServiceRequest = Message<<P as ClientProto<T>>::Request, B>

The request type for the service.
Source§

type ServiceResponse = Message<<P as ClientProto<T>>::Response, Body<<P as ClientProto<T>>::ResponseBody, <P as ClientProto<T>>::Error>>

The response type for the service.
Source§

type ServiceError = <P as ClientProto<T>>::Error

The error type for the service.
Source§

type BindClient = ClientProxy<<P as BindClient<StreamingPipeline<B>, T>>::ServiceRequest, <P as BindClient<StreamingPipeline<B>, T>>::ServiceResponse, <P as BindClient<StreamingPipeline<B>, T>>::ServiceError>

The bound service.
Source§

fn bind_client(&self, handle: &Handle, io: T) -> Self::BindClient

Bind an I/O object as a service.
Source§

impl<P, T, B> BindServer<StreamingPipeline<B>, T> for P
where P: ServerProto<T>, T: 'static, B: Stream<Item = P::ResponseBody, Error = P::Error>,

Source§

type ServiceRequest = Message<<P as ServerProto<T>>::Request, Body<<P as ServerProto<T>>::RequestBody, <P as ServerProto<T>>::Error>>

The request type for the service.
Source§

type ServiceResponse = Message<<P as ServerProto<T>>::Response, B>

The response type for the service.
Source§

type ServiceError = <P as ServerProto<T>>::Error

The error type for the service.
Source§

fn bind_server<S>(&self, handle: &Handle, io: T, service: S)
where S: Service<Request = Self::ServiceRequest, Response = Self::ServiceResponse, Error = Self::ServiceError> + 'static,

Bind the service. Read more
Source§

impl<B: Debug> Debug for StreamingPipeline<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<B> Freeze for StreamingPipeline<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for StreamingPipeline<B>
where B: RefUnwindSafe,

§

impl<B> Send for StreamingPipeline<B>
where B: Send,

§

impl<B> Sync for StreamingPipeline<B>
where B: Sync,

§

impl<B> Unpin for StreamingPipeline<B>
where B: Unpin,

§

impl<B> UnwindSafe for StreamingPipeline<B>
where B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.