Struct tokio_tower::multiplex::client::Client[][src]

pub struct Client<T, E, Request> where
    T: Sink<Request> + TryStream
{ /* fields omitted */ }
Expand description

This type provides an implementation of a Tower Service on top of a request-at-a-time protocol transport. In particular, it wraps a transport that implements Sink<SinkItem = Request> and Stream<Item = Response> with the necessary bookkeeping to adhere to Tower’s convenient fn(Request) -> Future<Response> API.

Implementations

Construct a new Client over the given transport.

If the Client errors, the error is dropped when new is used – use with_error_handler to handle such an error explicitly.

Construct a new Client over the given transport.

If the Client errors, its error is passed to on_service_error.

Trait Implementations

Formats the value using the given formatter. Read more

A comparable load metric. Read more

Estimate the service’s current load.

Responses given by the service.

Errors produced by the service.

The future response value.

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more

Process the request and return the response asynchronously. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Items produced by the transport

Errors produced when receiving from the transport

Errors produced when sending to the transport

The Sink + Stream implementation created by this factory

Errors produced while building a transport.

The future of the Service instance.

Returns Ready when the factory is able to create more transports. Read more

Create and return a new transport asynchronously.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.