Struct HttpServiceConnectorLayer
pub struct HttpServiceConnectorLayer { /* private fields */ }http and std only.Expand description
HTTP service discovery and bounded connection-selection policy.
Implementations§
§impl HttpServiceConnectorLayer
impl HttpServiceConnectorLayer
pub fn new() -> HttpServiceConnectorLayer
pub fn maybe_with_cache(
self,
cache: Option<AltSvcCache>,
) -> HttpServiceConnectorLayer
pub fn maybe_with_cache( self, cache: Option<AltSvcCache>, ) -> HttpServiceConnectorLayer
Share cached candidates and HTTP/2 frame learning; None disables both.
Response observation is composed separately with AltSvcLayer.
pub fn maybe_set_cache(
&mut self,
cache: Option<AltSvcCache>,
) -> &mut HttpServiceConnectorLayer
pub fn maybe_set_cache( &mut self, cache: Option<AltSvcCache>, ) -> &mut HttpServiceConnectorLayer
Share cached candidates and HTTP/2 frame learning; None disables both.
Response observation is composed separately with AltSvcLayer.
pub fn with_cache(self, cache: AltSvcCache) -> HttpServiceConnectorLayer
pub fn with_cache(self, cache: AltSvcCache) -> HttpServiceConnectorLayer
Share cached candidates and HTTP/2 frame learning; None disables both.
Response observation is composed separately with AltSvcLayer.
pub fn set_cache(
&mut self,
cache: AltSvcCache,
) -> &mut HttpServiceConnectorLayer
pub fn set_cache( &mut self, cache: AltSvcCache, ) -> &mut HttpServiceConnectorLayer
Share cached candidates and HTTP/2 frame learning; None disables both.
Response observation is composed separately with AltSvcLayer.
pub fn without_cache(self) -> HttpServiceConnectorLayer
pub fn without_cache(self) -> HttpServiceConnectorLayer
Share cached candidates and HTTP/2 frame learning; None disables both.
Response observation is composed separately with AltSvcLayer.
pub fn unset_cache(&mut self) -> &mut HttpServiceConnectorLayer
pub fn unset_cache(&mut self) -> &mut HttpServiceConnectorLayer
Share cached candidates and HTTP/2 frame learning; None disables both.
Response observation is composed separately with AltSvcLayer.
pub fn with_attempt_timeout(
self,
timeout: Duration,
) -> HttpServiceConnectorLayer
pub fn with_attempt_timeout( self, timeout: Duration, ) -> HttpServiceConnectorLayer
Bound one alternative connection attempt, including DNS and handshakes.
Defaults to 300 ms to bound sequential speculation before origin fallback. Increase this for high-latency paths; this connector does not race the origin.
pub fn set_attempt_timeout(
&mut self,
timeout: Duration,
) -> &mut HttpServiceConnectorLayer
pub fn set_attempt_timeout( &mut self, timeout: Duration, ) -> &mut HttpServiceConnectorLayer
Bound one alternative connection attempt, including DNS and handshakes.
Defaults to 300 ms to bound sequential speculation before origin fallback. Increase this for high-latency paths; this connector does not race the origin.
pub fn maybe_with_timeout(
self,
timeout: Option<Duration>,
) -> HttpServiceConnectorLayer
pub fn maybe_with_timeout( self, timeout: Option<Duration>, ) -> HttpServiceConnectorLayer
Bound the entire connection-selection operation, including fallback. Disabled by default; the caller’s transport deadlines remain authoritative.
pub fn maybe_set_timeout(
&mut self,
timeout: Option<Duration>,
) -> &mut HttpServiceConnectorLayer
pub fn maybe_set_timeout( &mut self, timeout: Option<Duration>, ) -> &mut HttpServiceConnectorLayer
Bound the entire connection-selection operation, including fallback. Disabled by default; the caller’s transport deadlines remain authoritative.
pub fn with_timeout(self, timeout: Duration) -> HttpServiceConnectorLayer
pub fn with_timeout(self, timeout: Duration) -> HttpServiceConnectorLayer
Bound the entire connection-selection operation, including fallback. Disabled by default; the caller’s transport deadlines remain authoritative.
pub fn set_timeout(
&mut self,
timeout: Duration,
) -> &mut HttpServiceConnectorLayer
pub fn set_timeout( &mut self, timeout: Duration, ) -> &mut HttpServiceConnectorLayer
Bound the entire connection-selection operation, including fallback. Disabled by default; the caller’s transport deadlines remain authoritative.
pub fn without_timeout(self) -> HttpServiceConnectorLayer
pub fn without_timeout(self) -> HttpServiceConnectorLayer
Bound the entire connection-selection operation, including fallback. Disabled by default; the caller’s transport deadlines remain authoritative.
pub fn unset_timeout(&mut self) -> &mut HttpServiceConnectorLayer
pub fn unset_timeout(&mut self) -> &mut HttpServiceConnectorLayer
Bound the entire connection-selection operation, including fallback. Disabled by default; the caller’s transport deadlines remain authoritative.
pub fn with_max_candidates(self, count: usize) -> HttpServiceConnectorLayer
pub fn with_max_candidates(self, count: usize) -> HttpServiceConnectorLayer
Bound inspected candidates, including unknown or unsupported protocols.
Defaults to 16, matching the cache’s default advertisement capacity.
Zero bypasses alternatives. Local capability refusals do not consume
max_attempts, so this separately bounds caller-supplied candidate lists.
pub fn set_max_candidates(
&mut self,
count: usize,
) -> &mut HttpServiceConnectorLayer
pub fn set_max_candidates( &mut self, count: usize, ) -> &mut HttpServiceConnectorLayer
Bound inspected candidates, including unknown or unsupported protocols.
Defaults to 16, matching the cache’s default advertisement capacity.
Zero bypasses alternatives. Local capability refusals do not consume
max_attempts, so this separately bounds caller-supplied candidate lists.
pub fn with_max_attempts(self, count: usize) -> HttpServiceConnectorLayer
pub fn with_max_attempts(self, count: usize) -> HttpServiceConnectorLayer
Bound connection attempts, reserving one for ordinary origin fallback. Zero rejects the operation without invoking the inner connector.
pub fn set_max_attempts(
&mut self,
count: usize,
) -> &mut HttpServiceConnectorLayer
pub fn set_max_attempts( &mut self, count: usize, ) -> &mut HttpServiceConnectorLayer
Bound connection attempts, reserving one for ordinary origin fallback. Zero rejects the operation without invoking the inner connector.
pub fn with_http3_upgrades(self, allow: bool) -> HttpServiceConnectorLayer
pub fn with_http3_upgrades(self, allow: bool) -> HttpServiceConnectorLayer
Let an upgrade or Extended CONNECT follow an HTTP/3 alternative, whose advertisement does not promise Extended CONNECT. Disabled by default.
pub fn set_http3_upgrades(
&mut self,
allow: bool,
) -> &mut HttpServiceConnectorLayer
pub fn set_http3_upgrades( &mut self, allow: bool, ) -> &mut HttpServiceConnectorLayer
Let an upgrade or Extended CONNECT follow an HTTP/3 alternative, whose advertisement does not promise Extended CONNECT. Disabled by default.
Trait Implementations§
§impl Clone for HttpServiceConnectorLayer
impl Clone for HttpServiceConnectorLayer
§fn clone(&self) -> HttpServiceConnectorLayer
fn clone(&self) -> HttpServiceConnectorLayer
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 HttpServiceConnectorLayer
impl Debug for HttpServiceConnectorLayer
§impl Default for HttpServiceConnectorLayer
impl Default for HttpServiceConnectorLayer
§fn default() -> HttpServiceConnectorLayer
fn default() -> HttpServiceConnectorLayer
§impl<S> Layer<S> for HttpServiceConnectorLayer
impl<S> Layer<S> for HttpServiceConnectorLayer
§type Service = HttpServiceConnector<S>
type Service = HttpServiceConnector<S>
§fn layer(&self, inner: S) -> <HttpServiceConnectorLayer as Layer<S>>::Service
fn layer(&self, inner: S) -> <HttpServiceConnectorLayer as Layer<S>>::Service
§fn into_layer(self, inner: S) -> Self::Service
fn into_layer(self, inner: S) -> Self::Service
layer but consuming self after the service was created. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HttpServiceConnectorLayer
impl !UnwindSafe for HttpServiceConnectorLayer
impl Forget for HttpServiceConnectorLayer
impl Freeze for HttpServiceConnectorLayer
impl Move for HttpServiceConnectorLayer
impl Send for HttpServiceConnectorLayer
impl Sync for HttpServiceConnectorLayer
impl Unpin for HttpServiceConnectorLayer
impl UnsafeUnpin for HttpServiceConnectorLayer
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