Enum PlaintextHttpProxyMode
pub enum PlaintextHttpProxyMode {
Forward,
Tunnel,
}http and std only.Expand description
Requested handling of plaintext HTTP and WebSocket traffic through an HTTP(S) proxy.
Keeping this preference on the request lets route-aware connection pools distinguish ordinary forward-proxy connections from CONNECT tunnels before selecting a connection. An HTTP-proxy connector consumes the preference while establishing that connection; custom connectors must do the same for this option to have an effect. CONNECT does not encrypt the plaintext origin traffic carried inside it.
Variants§
Forward
Send an ordinary forward-proxy request (absolute-form on HTTP/1).
Tunnel
Establish an HTTP CONNECT tunnel before sending the origin request.
Implementations§
§impl PlaintextHttpProxyMode
impl PlaintextHttpProxyMode
pub fn should_forward(self, application_protocol: Option<&Protocol>) -> bool
pub fn should_forward(self, application_protocol: Option<&Protocol>) -> bool
Whether the application protocol should use ordinary forwarding when connecting through an HTTP(S) proxy. Secure, unknown, and non-HTTP application protocols require a tunnel regardless of this preference.
Trait Implementations§
§impl Clone for PlaintextHttpProxyMode
impl Clone for PlaintextHttpProxyMode
§fn clone(&self) -> PlaintextHttpProxyMode
fn clone(&self) -> PlaintextHttpProxyMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PlaintextHttpProxyMode
§impl Debug for PlaintextHttpProxyMode
impl Debug for PlaintextHttpProxyMode
§impl Default for PlaintextHttpProxyMode
impl Default for PlaintextHttpProxyMode
§fn default() -> PlaintextHttpProxyMode
fn default() -> PlaintextHttpProxyMode
impl Eq for PlaintextHttpProxyMode
impl Extension for PlaintextHttpProxyMode
§impl Hash for PlaintextHttpProxyMode
impl Hash for PlaintextHttpProxyMode
impl HttpExtension for PlaintextHttpProxyMode
§impl PartialEq for PlaintextHttpProxyMode
impl PartialEq for PlaintextHttpProxyMode
impl ProxyExtension for PlaintextHttpProxyMode
impl StructuralPartialEq for PlaintextHttpProxyMode
Auto Trait Implementations§
impl Freeze for PlaintextHttpProxyMode
impl RefUnwindSafe for PlaintextHttpProxyMode
impl Send for PlaintextHttpProxyMode
impl Sync for PlaintextHttpProxyMode
impl Unpin for PlaintextHttpProxyMode
impl UnsafeUnpin for PlaintextHttpProxyMode
impl UnwindSafe for PlaintextHttpProxyMode
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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