pub struct ProxyAddressService<S> { /* private fields */ }std only.Expand description
Service produced by ProxyAddressLayer.
Implementations§
Source§impl<S> ProxyAddressService<S>
impl<S> ProxyAddressService<S>
Sourcepub const fn new(inner: S, address: ProxyAddress) -> Self
pub const fn new(inner: S, address: ProxyAddress) -> Self
Create a new ProxyAddressService that will create
a service to set the given ProxyAddress as a proxied ProxyRoute.
Sourcepub const fn maybe(inner: S, address: Option<ProxyAddress>) -> Self
pub const fn maybe(inner: S, address: Option<ProxyAddress>) -> Self
Create a new ProxyAddressService which will create
a service that will set the given ProxyAddress as a proxied ProxyRoute if it is not
None.
Sourcepub fn try_from_env_default(inner: S) -> Result<Self, BoxError>
pub fn try_from_env_default(inner: S) -> Result<Self, BoxError>
Try to create a new ProxyAddressService which will establish
a proxy connection over the environment variable http_proxy.
Uppercase HTTP_PROXY is deliberately not accepted by default because
CGI derives it from an incoming Proxy header. Use
ProxyEnvLayer for curl-compatible HTTP, HTTPS, and all-protocol
environment selection.
Sourcepub fn try_from_env(inner: S, key: impl AsRef<str>) -> Result<Self, BoxError>
pub fn try_from_env(inner: S, key: impl AsRef<str>) -> Result<Self, BoxError>
Try to create a new ProxyAddressService which will establish
a proxy connection over the given environment variable.
Sourcepub fn with_overwrite(self, overwrite: bool) -> Self
pub fn with_overwrite(self, overwrite: bool) -> Self
Replace an existing ProxyRoute or ProxyRoutes decision.
Existing routes are preserved by default.
Sourcepub fn set_overwrite(&mut self, overwrite: bool) -> &mut Self
pub fn set_overwrite(&mut self, overwrite: bool) -> &mut Self
Replace an existing ProxyRoute or ProxyRoutes decision.
Existing routes are preserved by default.
Trait Implementations§
Source§impl<S: Clone> Clone for ProxyAddressService<S>
impl<S: Clone> Clone for ProxyAddressService<S>
Source§fn clone(&self) -> ProxyAddressService<S>
fn clone(&self) -> ProxyAddressService<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<S: Debug> Debug for ProxyAddressService<S>
impl<S: Debug> Debug for ProxyAddressService<S>
Auto Trait Implementations§
impl<S> !Freeze for ProxyAddressService<S>
impl<S> RefUnwindSafe for ProxyAddressService<S>where
S: RefUnwindSafe,
impl<S> Send for ProxyAddressService<S>where
S: Send,
impl<S> Sync for ProxyAddressService<S>where
S: Sync,
impl<S> Unpin for ProxyAddressService<S>where
S: Unpin,
impl<S> UnsafeUnpin for ProxyAddressService<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ProxyAddressService<S>where
S: UnwindSafe,
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
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,
Source§impl<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
impl<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
Source§type Connection = Connection
type Connection = Connection
std only.ConnectorServiceSource§fn connect(
&self,
input: Input,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
fn connect( &self, input: Input, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
std only.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
Source§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> SystemProxyPacResolver for Twhere
T: Service<SystemProxyPacRequest, Output = Option<ProxyRoutes>>,
<T as Service<SystemProxyPacRequest>>::Error: Into<Box<dyn Error + Sync + Send>>,
Source§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
value to writerSource§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
value to writerSource§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
value to writerSource§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
value to writerSource§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
value to writer