pub struct UnixClientConfig { /* private fields */ }Expand description
A Connector that dials a fixed Unix domain socket path.
Every connection opens a fresh UnixStream to path, so a single UnixClientConfig is safe to
share across a pooled Client making
concurrent requests. The request URL’s host and port are ignored — the socket path is the
address — though the URL still supplies request metadata such as the Host header.
This handles only the single-socket case. To route different requests to different upstreams (a
mix of TCP and Unix sockets, or several Unix sockets), compose connectors behind a routing
Connector that dispatches on the Destination.
Implementations§
Trait Implementations§
Source§impl Clone for UnixClientConfig
impl Clone for UnixClientConfig
Source§fn clone(&self) -> UnixClientConfig
fn clone(&self) -> UnixClientConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Connector for UnixClientConfig
Available on Unix only.
impl Connector for UnixClientConfig
Available on Unix only.
Source§type Runtime = TokioRuntime
type Runtime = TokioRuntime
The
RuntimeTrait for this ConnectorSource§type Transport = TokioTransport<Compat<UnixStream>>
type Transport = TokioTransport<Compat<UnixStream>>
Source§type Udp = ()
type Udp = ()
The async UDP socket type for this connector. Used by QUIC adapters
for HTTP/3 support. Connectors that do not support UDP should set
this to
().Source§async fn connect(&self, url: &Url) -> Result<Self::Transport>
async fn connect(&self, url: &Url) -> Result<Self::Transport>
Initiate a connection to the provided url
Source§async fn connect_to(&self, destination: Destination) -> Result<Self::Transport>
async fn connect_to(&self, destination: Destination) -> Result<Self::Transport>
Open a connection to
destination: dialing its pre-resolved addresses if present, otherwise
resolving its host, and advertising any per-connection ALPN it carries. Read moreSource§async fn resolve(&self, _host: &str, _port: u16) -> Result<Vec<SocketAddr>>
async fn resolve(&self, _host: &str, _port: u16) -> Result<Vec<SocketAddr>>
Perform a DNS lookup for a given host-and-port
Source§fn arced(self) -> ArcedConnectorwhere
Self: Sized,
fn arced(self) -> ArcedConnectorwhere
Self: Sized,
Returns an object-safe
ArcedConnector. Do not implement this.Auto Trait Implementations§
impl Freeze for UnixClientConfig
impl RefUnwindSafe for UnixClientConfig
impl Send for UnixClientConfig
impl Sync for UnixClientConfig
impl Unpin for UnixClientConfig
impl UnsafeUnpin for UnixClientConfig
impl UnwindSafe for UnixClientConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more