Struct ProxyConnectionExtensions
pub struct ProxyConnectionExtensions(pub Extensions);net only.Expand description
Connection-scoped extensions for the hop to the proxy.
A request’s extensions configure its way to the origin; this bag is how you configure
the connection to the proxy itself. [proxy_request] copies it onto the request that
dials the proxy, so it acts as that hop’s request extensions: TLS settings for the
proxy, a [PoolPartition] of its own, or a ProxyRoute to reach the proxy through
another proxy. The proxy address still decides target, transport and HTTP version.
It is connection scoped itself, so it configures this one hop only. For the hop after it, put a bag in this bag. Its TLS settings and partition also keep tunnels over differently configured connections to one proxy apart in the pool.
The connection to a proxy is, for example, TCP → TLS → HTTP/2 to proxy.example:443;
many CONNECT streams share it. A connection through the proxy is one of those
streams → TLS → HTTP/2 to the origin, and is always kept per credential. This bag only
configures the first kind.
A connection to a proxy is shared across credentials by default, as each request and
each CONNECT carries its own Proxy-Authorization. When a proxy binds its
authentication or state to the connection (NTLM, Negotiate, a session per connection),
give each credential its own [PoolPartition] in this bag. Build it from a hash of the
credential with [ReuseKey::from_bits], not from the credential itself: a partition
shows up in debug logs.
Put it on a request, or on one route of a ProxyRoutes plan.
Tuple Fields§
§0: ExtensionsTrait Implementations§
§impl Clone for ProxyConnectionExtensions
impl Clone for ProxyConnectionExtensions
§fn clone(&self) -> ProxyConnectionExtensions
fn clone(&self) -> ProxyConnectionExtensions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ProxyConnectionExtensions
impl Debug for ProxyConnectionExtensions
§impl Default for ProxyConnectionExtensions
impl Default for ProxyConnectionExtensions
§fn default() -> ProxyConnectionExtensions
fn default() -> ProxyConnectionExtensions
§impl Extension for ProxyConnectionExtensions
impl Extension for ProxyConnectionExtensions
§fn scope() -> ExtensionScope
fn scope() -> ExtensionScope
Extensions chain a lookup of this type resolves,
ExtensionScope::Flow unless the type says otherwise.impl NetExtension for ProxyConnectionExtensions
impl ProxyExtension for ProxyConnectionExtensions
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyConnectionExtensions
impl !UnwindSafe for ProxyConnectionExtensions
impl Forget for ProxyConnectionExtensions
impl Freeze for ProxyConnectionExtensions
impl Move for ProxyConnectionExtensions
impl Send for ProxyConnectionExtensions
impl Sync for ProxyConnectionExtensions
impl Unpin for ProxyConnectionExtensions
impl UnsafeUnpin for ProxyConnectionExtensions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more