Skip to main content

EasyHttpConnectorBuilder

Struct EasyHttpConnectorBuilder 

Source
pub struct EasyHttpConnectorBuilder<C = (), S = (), D = ()> { /* private fields */ }
Available on crate features dns and http-backend and http and std and tcp only.
Expand description

Builder that is designed to easily create a connector for super::EasyHttpWebClient from most basic use cases

Implementations§

Source§

impl EasyHttpConnectorBuilder

Source

pub fn new() -> Self

Source

pub fn with_default_transport_connector( self, ) -> EasyHttpConnectorBuilder<TcpConnector, TransportStage>

Source

pub fn with_custom_transport_connector<C>( self, connector: C, ) -> EasyHttpConnectorBuilder<C, TransportStage>

Add a custom transport connector that will be used by this client for the transport layer

Source§

impl<T, Stage, D> EasyHttpConnectorBuilder<T, Stage, D>

Source

pub fn with_custom_connector<L>( self, connector_layer: L, ) -> EasyHttpConnectorBuilder<L::Service, Stage, D>
where L: Layer<T>,

Add a custom connector to this Stage.

Adding a custom connector to a stage will not change the state so this can be used to modify behaviour at a specific stage.

Source

pub fn map_connector<T2>( self, map_fn: impl FnOnce(T) -> T2, ) -> EasyHttpConnectorBuilder<T2, Stage, D>

Map the current connector using the given fn.

Mapping a connector to a stage will not change the state so this can be used to modify behaviour at a specific stage.

Source§

impl<T> EasyHttpConnectorBuilder<T, TransportStage>

Source

pub fn with_default_dns_connector( self, ) -> EasyHttpConnectorBuilder<DnsConnector<T>, DnsStage, DnsConnectorLayer>

Add the global DNS policy to both the stream and built-in QUIC transports.

Source

pub fn with_dns_address_resolver<R: DnsAddressResolver + Clone>( self, resolver: R, ) -> EasyHttpConnectorBuilder<DnsConnector<T, R>, DnsStage, DnsConnectorLayer<R>>

Add a custom address resolver to both the stream and built-in QUIC transports.

Source

pub fn without_dns_connector(self) -> EasyHttpConnectorBuilder<T, DnsStage>

Omit DNS resolution. Transports require IP targets or their own resolution.

Source

pub fn with_dns_connector<L: Layer<T>>( self, layer: L, ) -> EasyHttpConnectorBuilder<L::Service, DnsStage, L>

Retain a custom DNS layer for both transport stacks.

The layer is applied to the stream transport here and to the built-in QUIC connector when with_http3_support is called. A layer specific to the stream transport can instead be paired with with_http3_connector, whose supplied connector owns its DNS policy independently.

Source§

impl<T, D> EasyHttpConnectorBuilder<T, DnsStage, D>

Source

pub fn with_custom_tls_proxy_connector<L>( self, connector_layer: L, ) -> EasyHttpConnectorBuilder<L::Service, ProxyTunnelStage<true>, D>
where L: Layer<T>,

Add a custom proxy TLS connector used to establish TLS to an HTTPS proxy.

The layer must attach rama_tls::client::NegotiatedTlsParameters to the established connection. Rama uses this as positive proof that TLS was negotiated and to select the proxy-side HTTP version; missing evidence fails closed before proxy HTTP is sent.

Source

pub fn with_tls_proxy_support_using_boringssl( self, ) -> EasyHttpConnectorBuilder<TlsConnector<T, ConnectorKindTunnel>, ProxyTunnelStage<true>, D>

Available on crate feature boring only.

Support a tls tunnel to the proxy itself using boringssl

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source

pub fn with_tls_proxy_support_using_boringssl_config( self, config: TlsClientConfig, ) -> EasyHttpConnectorBuilder<TlsConnector<T, ConnectorKindTunnel>, ProxyTunnelStage<true>, D>

Available on crate feature boring only.

Support a tls tunnel to the proxy itself using boringssl and the provided config

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source

pub fn with_tls_proxy_support_using_rustls( self, ) -> EasyHttpConnectorBuilder<TlsConnector<T, ConnectorKindTunnel>, ProxyTunnelStage<true>, D>

Available on crate feature rustls only.

Support a tls tunnel to the proxy itself using rustls

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source

pub fn with_tls_proxy_support_using_rustls_config( self, config: TlsClientConfig, ) -> EasyHttpConnectorBuilder<TlsConnector<T, ConnectorKindTunnel>, ProxyTunnelStage<true>, D>

Available on crate feature rustls only.

Support a tls tunnel to the proxy itself using rustls and the provided config

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source

pub fn without_tls_proxy_support( self, ) -> EasyHttpConnectorBuilder<T, ProxyTunnelStage<false>, D>

Don’t support a tls tunnel to the proxy itself

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source§

impl<T, D, const TLS_PROXY: bool> EasyHttpConnectorBuilder<T, ProxyTunnelStage<TLS_PROXY>, D>

Source

pub fn with_custom_proxy_connector<L>( self, connector_layer: L, ) -> EasyHttpConnectorBuilder<L::Service, ProxyStage<true>, D>
where L: Layer<T>,

Add a custom proxy connector that will be used by this client

Source

pub fn with_http_proxy_support( self, ) -> EasyHttpConnectorBuilder<HttpProxyConnector<T>, ProxyStage<true>, D>

Add support for usage of a http(s) ProxyAddress to this client

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source

pub fn with_socks5_proxy_support( self, ) -> EasyHttpConnectorBuilder<Socks5ProxyConnector<T>, ProxyStage<true>, D>

Available on crate feature socks5 only.

Add support for usage of a socks5(h) ProxyAddress to this client

Source

pub fn without_proxy_support( self, ) -> EasyHttpConnectorBuilder<T, ProxyStage<false>, D>

Make a client without proxy support

Source§

impl<T: Clone, D, const TLS_PROXY: bool> EasyHttpConnectorBuilder<T, ProxyTunnelStage<TLS_PROXY>, D>

Source

pub fn with_proxy_support( self, ) -> EasyHttpConnectorBuilder<ProxyConnector<T>, ProxyStage<true>, D>

Available on crate feature socks5 only.

Add support for usage of a http(s) and socks5(h) ProxyAddress to this client

Note that a tls proxy is not needed to make a https connection to the final target. It only has an influence on the initial connection to the proxy itself

Source§

impl<T, D, const PROXY: bool> EasyHttpConnectorBuilder<T, ProxyStage<PROXY>, D>

Source

pub fn with_custom_tls_connector<L>( self, connector_layer: L, ) -> EasyHttpConnectorBuilder<L::Service, TlsStage<PROXY>, D>
where L: Layer<T>,

Add a custom tls connector that will be used by the client.

TLS connectors publish connection reuse policies on their established transports. Custom secure connectors without this metadata are not pooled; implement the generic connection reuse policy to support safe pooling.

The final HTTP transition applies a RequestVersionAdapter outside the complete connection attempt so it can apply the negotiated version to the original HTTP request.

Source

pub fn with_tls_support_using_boringssl( self, config: TlsClientConfig, ) -> EasyHttpConnectorBuilder<TlsConnector<T>, TlsStage<PROXY>, D>

Available on crate feature boring only.

Support https connections by using boringssl for tls

The final HTTP transition automatically applies the HTTP version negotiated through TLS to the original request.

Source

pub fn with_tls_support_using_boringssl_and_default_http_version( self, config: TlsClientConfig, default_http_version: Version, ) -> EasyHttpConnectorBuilder<AddInputExtension<TlsConnector<T>, FallbackHttpVersion>, TlsStage<PROXY>, D>

Available on crate feature boring only.

Same as Self::with_tls_support_using_boringssl but also setting a fallback HTTP version in case no ALPN is negotiated. The fallback does not constrain the ALPN protocols offered by TLS.

This is a fairly important detail for proxy purposes given otherwise you might come in situations where the ingress traffic is negotiated to h2, but the egress traffic has no negotiation which would without a default http version remain on h2… In such a case you can get failed requests if the egress server does not handle multiple http versions.

Source

pub fn with_tls_support_using_rustls( self, config: TlsClientConfig, ) -> EasyHttpConnectorBuilder<TlsConnector<T>, TlsStage<PROXY>, D>

Available on crate feature rustls only.

Support https connections by using ruslts for tls

The final HTTP transition automatically applies the HTTP version negotiated through TLS to the original request.

Source

pub fn with_tls_support_using_rustls_and_default_http_version( self, config: TlsClientConfig, default_http_version: Version, ) -> EasyHttpConnectorBuilder<AddInputExtension<TlsConnector<T>, FallbackHttpVersion>, TlsStage<PROXY>, D>

Available on crate feature rustls only.

Same as Self::with_tls_support_using_rustls but also setting a fallback HTTP version in case no ALPN is negotiated. The fallback does not constrain the ALPN protocols offered by TLS.

This is a fairly important detail for proxy purposes given otherwise you might come in situations where the ingress traffic is negotiated to h2, but the egress traffic has no negotiation which would without a default http version remain on h2… In such a case you can get failed requests if the egress server does not handle multiple http versions.

Source

pub fn without_tls_support( self, ) -> EasyHttpConnectorBuilder<T, TlsStage<PROXY>, D>

Don’t support https on this connector

Source§

impl<T, D, const PROXY: bool> EasyHttpConnectorBuilder<T, TlsStage<PROXY>, D>

Source

pub fn with_default_http_connector<Body>( self, exec: Executor, ) -> EasyHttpConnectorBuilder<HttpConnector<T, Body>, HttpStage<PROXY>, D>

Add http support to this connector

Source

pub fn with_custom_http_connector<L>( self, connector_layer: L, ) -> EasyHttpConnectorBuilder<L::Service, HttpStage<PROXY>, D>
where L: Layer<T>,

Add a custom http connector that will be run just after tls

Source§

impl<T, Body, D, const PROXY: bool> EasyHttpConnectorBuilder<HttpConnector<T, Body>, HttpStage<PROXY>, D>

Source

pub fn with_http3_connector<C>( self, connector: C, ) -> EasyHttpConnectorBuilder<HttpConnector<HttpTransportConnector<T, C>, Body>, HttpStage<PROXY>, D>

Add a separately configured QUIC transport below the common HTTP handshake. The connector supplies its own transport, DNS and TLS policy. Its policy publishes connection reuse metadata for its effective policy. Custom connectors without that metadata are not pooled. Use Self::with_http3_support for the built-in connector.

Source

pub fn with_http3_support( self, connector: Http3Connector, ) -> EasyHttpConnectorBuilder<HttpConnector<HttpTransportConnector<T, D::Service>, Body>, HttpStage<PROXY>, D>

Enable the built-in QUIC connector with the same DNS layer as the stream transport.

The retained layer must support the QUIC connector as its inner service. This does not copy a custom stream transport or its routing policy. Use Self::with_http3_connector for an equivalent custom QUIC path.

Source§

impl<T> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<T>>, AltSvcConnectionLayer>>>, PoolStage>

Source

pub fn without_alt_svc(self) -> Self

Disable advertised alternatives and response learning for every HTTP version.

Source

pub fn maybe_with_alt_svc_cache(self, cache: Option<AltSvcCache>) -> Self

Share an alternative-service cache across HTTP clients; None disables discovery.

Source

pub fn maybe_set_alt_svc_cache( &mut self, cache: Option<AltSvcCache>, ) -> &mut Self

Share an alternative-service cache across HTTP clients; None disables discovery.

Source

pub fn with_alt_svc_cache(self, cache: AltSvcCache) -> Self

Share an alternative-service cache across HTTP clients; None disables discovery.

Source

pub fn set_alt_svc_cache(&mut self, cache: AltSvcCache) -> &mut Self

Share an alternative-service cache across HTTP clients; None disables discovery.

Source

pub fn without_alt_svc_cache(self) -> Self

Share an alternative-service cache across HTTP clients; None disables discovery.

Source

pub fn unset_alt_svc_cache(&mut self) -> &mut Self

Share an alternative-service cache across HTTP clients; None disables discovery.

Source§

impl<T, D, const PROXY: bool> EasyHttpConnectorBuilder<T, HttpStage<PROXY>, D>

Source

pub fn with_proxy_route_failure_cache( self, cache: ProxyRouteFailureCache, ) -> EasyHttpConnectorBuilder<ProxyRouteFailureCacheConnector<BoxService<ConnectRequest, EstablishedClientConnection<T::Connection, ConnectRequest>, ConnectionError>>, ProxyRouteFailureCacheStage, D>

Explicitly use the given shared proxy route failure cache.

This selects the failure-cache policy for the final connection stage. The configured connector is type-erased at this boundary to keep the combined connector future stack-safe.

Source

pub fn without_proxy_route_failure_cache( self, ) -> EasyHttpConnectorBuilder<T, ProxyRouteFailureCacheStage, D>

Disable negative caching of temporarily failing proxy routes.

Source§

impl<T, D> EasyHttpConnectorBuilder<T, HttpStage<true>, D>

Source

pub fn without_connection_pool( self, ) -> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<ProxyRouteFailureCacheConnector<BoxService<ConnectRequest, EstablishedClientConnection<T::Connection, ConnectRequest>, ConnectionError>>>>, AltSvcConnectionLayer>>>, PoolStage>

Finish the default HTTP connector stack without adding a connection pool.

This still installs HTTP request adaptation and ordered proxy-route fallback. It also installs the default proxy-route failure cache. The only omitted component is the pool itself.

Source

pub fn try_with_connection_pool( self, config: HttpPooledConnectorConfig, ) -> Result<EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<HttpPooledConnector<ProxyRouteFailureCacheConnector<BoxService<ConnectRequest, EstablishedClientConnection<T::Connection, ConnectRequest>, ConnectionError>>>>>, AltSvcConnectionLayer>>>, PoolStage>, BoxError>

Use the default connection pool for this super::EasyHttpWebClient

This will create a MultiplexPool using the provided limits and will use super::HttpConnIdentifier to group connections on protocol, authority, selected route, physical transport, any HTTP version requirement, and the selected plaintext HTTP proxy mode. This keeps forward-proxy connections separate from CONNECT tunnels to the same proxy. The default proxy-route failure cache is installed behind the pool, so reusable connections bypass negative-cache checks.

Use wait_for_pool_timeout to limit how long we wait for the pool to give us a connection

If you need a different pool or custom way to group connection you can use EasyHttpConnectorBuilder::with_custom_connection_pool() to provide you own.

This also applies a RequestVersionAdapter layer to make sure that request versions are adapted when pooled connections are used, which you almost always need, but in case that is unwanted, you can use Self::with_custom_connection_pool instead.

Source

pub fn with_default_connection_pool( self, ) -> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<HttpPooledConnector<ProxyRouteFailureCacheConnector<BoxService<ConnectRequest, EstablishedClientConnection<T::Connection, ConnectRequest>, ConnectionError>>>>>, AltSvcConnectionLayer>>>, PoolStage>

Use Rama’s default connection pool and default proxy-route failure cache.

This operation is infallible because Rama’s built-in pool limits are known to be valid and non-zero.

Source

pub fn with_custom_connection_pool<P, R>( self, pool: P, req_to_conn_id: R, wait_for_pool_timeout: Option<Duration>, ) -> EasyHttpConnectorBuilder<PooledConnector<ProxyRouteFailureCacheConnector<BoxService<ConnectRequest, EstablishedClientConnection<T::Connection, ConnectRequest>, ConnectionError>>, P, R>, PoolStage>

Configure this client to use the provided Pool and ReqToConnId

Use wait_for_pool_timeout to limit how long we wait for the pool to give us a connection

Warning: this does not apply a RequestVersionAdapter layer to make sure that request versions are adapted when pooled connections are used, which you almost always. This should be manually added by using Self::with_custom_connector after configuring this pool and providing a RequestVersionAdapter there. Unlike Self::try_with_connection_pool, this fully generic method also does not install the HTTP connect-request adapter or proxy-route connector. It installs the default proxy-route failure cache behind the custom pool. Callers that want route-aware fallback around a custom pool can compose those layers explicitly around their PooledConnector.

When the connector supports plaintext HTTP through an HTTP proxy, the custom ReqToConnId must keep ordinary forward-proxy connections separate from CONNECT tunnels to the same proxy. Rama’s super::HttpConnIdentifier includes this distinction automatically.

The supplied ReqToConnID partitions routes and application protocols. The pool must also honor connection-owned reuse policies published by transport connectors. Return a non-reusable ConnID to require a fresh connection that must not return to the pool.

Source§

impl<T, D> EasyHttpConnectorBuilder<T, HttpStage<false>, D>

Source

pub fn without_connection_pool( self, ) -> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<T>>, AltSvcConnectionLayer>>>, PoolStage>

Finish the proxy-free HTTP connector stack without a connection pool.

No proxy-route failure cache is installed. Call Self::with_proxy_route_failure_cache before this method to explicitly add one for a custom transport.

Source

pub fn try_with_connection_pool( self, config: HttpPooledConnectorConfig, ) -> Result<EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<HttpPooledConnector<T>>>, AltSvcConnectionLayer>>>, PoolStage>, BoxError>

Use the default connection pool without a proxy-route failure cache.

Source

pub fn with_default_connection_pool( self, ) -> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<HttpPooledConnector<T>>>, AltSvcConnectionLayer>>>, PoolStage>

Use Rama’s known-valid default connection pool configuration without a proxy-route failure cache.

Source

pub fn with_custom_connection_pool<P, R>( self, pool: P, req_to_conn_id: R, wait_for_pool_timeout: Option<Duration>, ) -> EasyHttpConnectorBuilder<PooledConnector<T, P, R>, PoolStage>

Use a custom connection pool without a proxy-route failure cache.

The supplied ReqToConnID partitions routes and application protocols. The pool must also honor connection-owned reuse policies published by transport connectors. Return a non-reusable ConnID to require a fresh connection that must not return to the pool.

Source§

impl<T, D> EasyHttpConnectorBuilder<T, ProxyRouteFailureCacheStage, D>

Source

pub fn without_connection_pool( self, ) -> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<T>>, AltSvcConnectionLayer>>>, PoolStage>

Finish the default HTTP connector stack without a connection pool.

Source

pub fn try_with_connection_pool( self, config: HttpPooledConnectorConfig, ) -> Result<EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<HttpPooledConnector<T>>>, AltSvcConnectionLayer>>>, PoolStage>, BoxError>

Use the default connection pool with the selected failure-cache policy.

Source

pub fn with_default_connection_pool( self, ) -> EasyHttpConnectorBuilder<RequestVersionAdapter<HttpConnectRequestAdapter<MapEstablishedConnection<HttpServiceConnector<ProxyRoutesConnector<HttpPooledConnector<T>>>, AltSvcConnectionLayer>>>, PoolStage>

Use Rama’s known-valid default connection pool configuration with the selected failure-cache policy.

Source

pub fn with_custom_connection_pool<P, R>( self, pool: P, req_to_conn_id: R, wait_for_pool_timeout: Option<Duration>, ) -> EasyHttpConnectorBuilder<PooledConnector<T, P, R>, PoolStage>

Use a custom connection pool with the selected failure-cache policy.

For a proxy-capable connector, the custom ReqToConnID must partition plaintext HTTP forward-proxy connections from CONNECT tunnels to the same proxy. super::HttpConnIdentifier does so by default.

The supplied ReqToConnID partitions routes and application protocols. The pool must also honor connection-owned reuse policies published by transport connectors. Return a non-reusable ConnID to require a fresh connection that must not return to the pool.

Source§

impl<T> EasyHttpConnectorBuilder<T, PoolStage>

Source

pub fn build_client<Body, ModifiedBody, ConnResponse>( self, ) -> EasyHttpWebClient<Body, T::Output, ()>
where Body: StreamingBody<Data: Send + 'static, Error: Into<BoxError>> + Unpin + Send + 'static, ModifiedBody: StreamingBody<Data: Send + 'static, Error: Into<BoxError>> + Unpin + Send + 'static, T: Service<Request<Body>, Output = EstablishedClientConnection<ConnResponse, Request<ModifiedBody>>, Error: Into<BoxError>>, ConnResponse: ExtensionsRef,

Build a super::EasyHttpWebClient using the currently configured connector

Source§

impl<T, S, D> EasyHttpConnectorBuilder<T, S, D>

Source

pub fn build_connector(self) -> T

Build a connector from the currently configured setup

Trait Implementations§

Source§

impl<C: Default, S: Default, D: Default> Default for EasyHttpConnectorBuilder<C, S, D>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<C, S, D> Freeze for EasyHttpConnectorBuilder<C, S, D>
where C: Freeze, S: Freeze, D: Freeze,

§

impl<C, S, D> RefUnwindSafe for EasyHttpConnectorBuilder<C, S, D>

§

impl<C, S, D> Send for EasyHttpConnectorBuilder<C, S, D>
where C: Send, S: Send, D: Send,

§

impl<C, S, D> Sync for EasyHttpConnectorBuilder<C, S, D>
where C: Sync, S: Sync, D: Sync,

§

impl<C, S, D> Unpin for EasyHttpConnectorBuilder<C, S, D>
where C: Unpin, S: Unpin, D: Unpin,

§

impl<C, S, D> UnsafeUnpin for EasyHttpConnectorBuilder<C, S, D>

§

impl<C, S, D> UnwindSafe for EasyHttpConnectorBuilder<C, S, D>
where C: UnwindSafe, S: UnwindSafe, D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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

§

fn into_request(self) -> Request<T>

Wrap the input message T in a rama_grpc::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

impl<T, U> RamaFrom<T> for U
where U: From<T>,

§

fn rama_from(value: T) -> U

§

impl<T, U, CrateMarker> RamaInto<U, CrateMarker> for T
where U: RamaFrom<T, CrateMarker>,

§

fn rama_into(self) -> U

§

impl<T, U> RamaTryFrom<T> for U
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

§

fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>

§

impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for T
where 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 T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<V, F> ValueFormatter<&V> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &&V)

Write value to writer
§

impl<V, F> ValueFormatter<Arc<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Arc<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Box<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Box<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Cow<'_, V>> for F
where V: ToOwned + ?Sized, F: ValueFormatter<V> + ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)

Write value to writer
§

impl<V, F> ValueFormatter<Option<V>> for F
where F: ValueFormatter<V> + ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Option<V>)

Write value to writer
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more