pub struct TransportHints {
pub target: Option<Bytes>,
pub sni_hostname: Option<String>,
pub resolved_target: Option<ResolvedTarget>,
pub trace: Option<Arc<dyn TraceObserver>>,
}Expand description
Typed transport-level hints carried on a request.
These are not HTTP headers and do not affect logical URL semantics (routing, cookies, auth-origin comparisons, redirects, proxy selection). They control only the wire-level behavior of the transport layer.
Timeout is kept in the existing Timeout model and must not be
duplicated here.
Fields§
§target: Option<Bytes>Override the wire request target (e.g. OPTIONS *, absolute-form).
When present this replaces only the URI sent on the wire; the logical URL used for connection routing, Host header defaults, cookies, auth, redirects, and proxy selection remains unchanged.
sni_hostname: Option<String>Override the TLS Server Name Indication hostname.
TCP connects to the URL host/IP; TLS uses this name for SNI and certificate verification.
resolved_target: Option<ResolvedTarget>Caller-supplied physical destinations for the logical URL origin.
When present, direct routing uses exactly these addresses and never performs a DNS lookup. Same-origin redirects preserve this snapshot; cross-origin redirects fail closed. Proxy, UDS, and HTTP/3 routes are rejected while this hint is active.
trace: Option<Arc<dyn TraceObserver>>Optional trace observer for transport lifecycle events.
When present, the transport layer emits typed events at each lifecycle boundary (TCP connect, TLS handshake, request/response headers, body chunks, connection close). The observer is invoked synchronously within the async context and must not block.
Trait Implementations§
Source§impl Clone for TransportHints
impl Clone for TransportHints
Source§fn clone(&self) -> TransportHints
fn clone(&self) -> TransportHints
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more