Skip to main content

Module client

Module client 

Available on crate feature net only.
Expand description

generic client net logic

Modules§

pool

Structs§

AbortableConnectorService
A Service that runs every established client connection in its own child Scope and cuts its I/O once that scope is aborted, see AbortableIo.
BoxedConnectorService
A ConnectorService which only job is to Box the created Service by the inner ConnectorService.
BypassRules
A compiled set of proxy bypass rules.
ConnectRequest
A protocol-independent request to establish a client connection.
ConnectionAttempt
Requirements and observations for one connection attempt, shared with address races and outer deadlines through request extensions.
ConnectionAttemptTransfer
Gives a child connection an attempt ConnectionAttempt::dialed_for the attempt of its parent, if that has one.
ConnectionError
A classified error produced while establishing or using a client connection.
ConnectorTarget
Target HostWithPort which if found in extensions is to be used by a connector such as a TCPConnector instead of the requested address, unless a proxy is requested in which case a proxy is to be used instead.
ConnectorTargetStream
Extensions carrier for an AddressCandidates source.
ConnectorTransportProtocol
Transport protocol a connector must use for the selected route.
DialedProxyConnection
Marks a connection to a proxy made by a ProxyDialer, naming the proxy it was dialed to.
DirectOnlyConnector
A connector for a client without proxy support: it serves a route without a proxy and refuses a proxied ProxyRoute instead of connecting around the proxy.
DirectOnlyConnectorLayer
Layer producing a DirectOnlyConnector.
EstablishedClientConnection
The established connection to a server returned for the http client to be used.
LazyProxyAddressLayer
Lazily resolve and apply a proxy address to any input with extensions.
LazyProxyAddressService
Service produced by LazyProxyAddressLayer.
MapEstablishedConnection
Apply middleware to each connection returned by a connector.
MapEstablishedConnectionLayer
A Layer that produces a MapEstablishedConnection service.
MaybeProxiedConnector
Route a client connection directly or through a proxy, making a proxy optional.
NoProxyEnvLayer
Lazily apply conventional NO_PROXY bypass rules.
NoProxyEnvService
Service produced by NoProxyEnvLayer.
PlaintextProxyOnly
The connector towards proxies PlaintextProxyOnlyLayer creates.
PlaintextProxyOnlyLayer
The TLS stage of a connector towards proxies that has no TLS: it refuses every proxy that asks for TLS, before anything is dialed.
ProxiedRoute
Selects every input with a proxied ProxyRoute, whichever proxy it names.
ProxyAddressLayer
Apply one fixed proxy address to any service input with extensions.
ProxyAddressService
Service produced by ProxyAddressLayer.
ProxyBypassLayer
Apply precompiled BypassRules to a service input.
ProxyBypassService
Service produced by ProxyBypassLayer.
ProxyConnectionExtensions
Connection-scoped extensions for the hop to the proxy.
ProxyConnectionExtensionsTransfer
Moves the contents of ProxyConnectionExtensions onto the connection to the proxy, see [proxy_request].
ProxyDialRequest
What a ProxyDialer dials: the connection to proxy, for the origin request whose extensions are origin.
ProxyDialer
Dials the connection to a proxy: proxy_request through the connector towards proxies it wraps, which hands back that connection.
ProxyDialerLayer
Wraps a connector towards proxies in a ProxyDialer.
ProxyEnvLayer
Lazily select a proxy from curl-compatible environment variables.
ProxyEnvService
Service produced by ProxyEnvLayer.
ProxyRouteConnectError
Errors produced by every attempted route of an unsuccessful connection.
ProxyRouteFailureCache
Shared negative cache for temporarily failing proxy routes.
ProxyRouteFailureCacheConfig
Configuration for a ProxyRouteFailureCache.
ProxyRouteFailureCacheConnector
Connector wrapper that applies a shared ProxyRouteFailureCache.
ProxyRouteFailureCacheLayer
Layer that applies a shared ProxyRouteFailureCache to a connector.
ProxyRouteFailureCachedError
Error returned when a proxy route is still inside its failure backoff.
ProxyRouteIndex
Index of the selected route within the ordered route collection.
ProxyRoutes
Ordered proxy routes to try while establishing a client connection.
ProxyRoutesConnector
Try ordered proxy routes until a connection is established.
ProxyRoutesConnectorLayer
Layer that tries ordered proxy routes while establishing a connection.
ProxyRoutesLayer
Resolve and materialize the route decision for downstream middleware.
ProxyRoutesService
Service produced by ProxyRoutesLayer.
SystemProxyConfig
A snapshot of the operating system’s proxy configuration.
SystemProxyConnectLayer
Adapt a SystemProxyLayer to connector-level ConnectRequest inputs.
SystemProxyConnectService
Service produced by SystemProxyConnectLayer.
SystemProxyLayer
Apply the operating system’s proxy settings to client service inputs.
SystemProxyPacRequest
The request information passed to a system PAC resolver.
SystemProxyService
See SystemProxyLayer.

Enums§

ConnectionErrorDomain
The architectural domain in which establishing or using a client connection failed.
ConnectionErrorKind
A protocol-independent description of a failed connection operation.
ConnectionPolicyScope
Whether an establishment result describes a connector’s fixed policy or a request override. Publish this on established connections or classified errors so discovery and failure caches can scope availability updates correctly.
EitherConn
A type to allow you to use multiple types as a single type.
EitherConn3
A type to allow you to use multiple types as a single type.
EitherConn4
A type to allow you to use multiple types as a single type.
EitherConn5
A type to allow you to use multiple types as a single type.
EitherConn6
A type to allow you to use multiple types as a single type.
EitherConn7
A type to allow you to use multiple types as a single type.
EitherConn8
A type to allow you to use multiple types as a single type.
EitherConn9
A type to allow you to use multiple types as a single type.
EitherConn3Connected
A type to allow you to use multiple types as a single type.
EitherConn4Connected
A type to allow you to use multiple types as a single type.
EitherConn5Connected
A type to allow you to use multiple types as a single type.
EitherConn6Connected
A type to allow you to use multiple types as a single type.
EitherConn7Connected
A type to allow you to use multiple types as a single type.
EitherConn8Connected
A type to allow you to use multiple types as a single type.
EitherConn9Connected
A type to allow you to use multiple types as a single type.
EitherConnConnected
A type to allow you to use multiple types as a single type.
EstablishedProxyRoute
The proxy route actually established by a connector.
MaybeProxied
The connection established by MaybeProxiedConnector, direct or through a proxy.
ProxyRoute
A requested route through which a client connection should be established.
ProxyRouteContext
Requested proxy route or ordered route plan used to scope connection outcomes.
ProxyRouteFailureCacheScope
Scope used to identify temporarily failing proxy routes.
SystemProxyInvalidBypassRulePolicy
How system proxy discovery handles bypass rules Rama cannot parse.

Constants§

DEFAULT_SYSTEM_PROXY_CONFIG_TTL
How long a SystemProxyLayer keeps a system proxy snapshot before lazily checking for changes.

Traits§

AddressCandidates
A lazily-resolved source of connection target IpAddresses.
ConnectorService
Glue trait that is used as the Connector trait bound for clients establishing a connection on one layer or another.
ProxySelector
Decides which side of a MaybeProxiedConnector serves an input.
SystemProxyPacResolver
Resolves proxy routes for a request using one system-configured PAC script.
SystemProxyPacService
Supplies a resolver for a system-configured PAC URI.

Functions§

proxy_connection_reuse
The reuse rules of a connection to a proxy, for the connection that carries origin requests over it: a tunnel through it, or that connection itself for a forwarding proxy. None if connection is not a connection to a proxy.
proxy_request
Create the request to establish the connection to proxy itself.
proxy_request_uri
Normalize a request target for fixed-proxy selection and PAC evaluation.
race_connect
Race connection attempts over a stream of candidate SocketAddresses.