pub struct HttpConnector<R = GaiResolver> { /* private fields */ }
Expand description

A connector for the http scheme.

Performs DNS resolution in a thread pool, and then connects over TCP.

Note

Sets the HttpInfo value on responses, which includes transport information such as the remote socket address used.

Implementations

Construct a new HttpConnector.

Construct a new HttpConnector.

Takes a Resolver to handle DNS lookups.

Option to enforce all Uris have the http scheme.

Enabled by default.

Set that all sockets have SO_KEEPALIVE set with the supplied duration.

If None, the option will not be set.

Default is None.

Set that all sockets have SO_NODELAY set to the supplied value nodelay.

Default is false.

Sets the value of the SO_SNDBUF option on the socket.

Sets the value of the SO_RCVBUF option on the socket.

Set that all sockets are bound to the configured address before connection.

If None, the sockets will not be bound.

Default is None.

Set that all sockets are bound to the configured IPv4 or IPv6 address (depending on host’s preferences) before connection.

Set the connect timeout.

If a domain resolves to multiple IP addresses, the timeout will be evenly divided across them.

Default is None.

Set timeout for RFC 6555 (Happy Eyeballs) algorithm.

If hostname resolves to both IPv4 and IPv6 addresses and connection cannot be established using preferred address family before timeout elapses, then connector will in parallel attempt connection using other address family.

If None, parallel connection attempts are disabled.

Default is 300 milliseconds.

Set that all socket have SO_REUSEADDR set to the supplied value reuse_address.

Default is false.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more