Struct HttpServiceAttempt
pub struct HttpServiceAttempt { /* private fields */ }http and std only.Expand description
Requirements and observations for one connection attempt, shared with address races and outer deadlines through request extensions.
An origin connector checks its effective policy before authentication using
Self::check_policy. Proxy/tunnel handshakes must not report as the origin.
The check is preflight only: the caller must still verify the authenticated
identity on the established connection, including pool hits.
Implementations§
§impl ConnectionAttempt
impl ConnectionAttempt
pub fn new() -> ConnectionAttempt
net only.pub fn with_authenticated_peer(self, peer: Host) -> ConnectionAttempt
Available on crate feature net only.
pub fn with_authenticated_peer(self, peer: Host) -> ConnectionAttempt
net only.Require this peer’s authenticated identity, independently of the dial target.
pub fn set_authenticated_peer(&mut self, peer: Host) -> &mut ConnectionAttempt
Available on crate feature net only.
pub fn set_authenticated_peer(&mut self, peer: Host) -> &mut ConnectionAttempt
net only.Require this peer’s authenticated identity, independently of the dial target.
pub fn check_policy(
&self,
scope: ConnectionPolicyScope,
authenticated_peer: Option<&Host>,
) -> Result<(), ConnectionError>
Available on crate feature net only.
pub fn check_policy( &self, scope: ConnectionPolicyScope, authenticated_peer: Option<&Host>, ) -> Result<(), ConnectionError>
net only.Report the effective policy and reject an attempt that cannot authenticate its required peer. This local unavailability permits another endpoint; it is not evidence that this endpoint or its proxy route is broken.
pub fn restrict_to_request_policy(&self)
Available on crate feature net only.
pub fn restrict_to_request_policy(&self)
net only.Prevent request-specific DNS, routing or transport configuration from updating shared endpoint health. Later TLS classification cannot erase this restriction; all components participate in the same attempt.
pub fn policy_scope(&self) -> ConnectionPolicyScope
Available on crate feature net only.
pub fn policy_scope(&self) -> ConnectionPolicyScope
net only.Policy used by this attempt. Unknown is deliberately conservative for custom connectors that do not report policy scope.
pub fn reject(&self)
Available on crate feature net only.
pub fn reject(&self)
net only.Preserve an authentication failure across address racing and cancellation.
pub fn reject_with_kind(&self, kind: ConnectionErrorKind)
Available on crate feature net only.
pub fn reject_with_kind(&self, kind: ConnectionErrorKind)
net only.Preserve terminal failures; authentication takes precedence regardless of address completion order. A timeout must not erase an earlier rejection.
pub fn failure_kind(&self) -> Option<ConnectionErrorKind>
Available on crate feature net only.
pub fn failure_kind(&self) -> Option<ConnectionErrorKind>
net only.Strongest terminal failure observed during this attempt.
pub fn failed(&self) -> bool
net only.Trait Implementations§
§impl Debug for ConnectionAttempt
impl Debug for ConnectionAttempt
§impl Default for ConnectionAttempt
impl Default for ConnectionAttempt
§fn default() -> ConnectionAttempt
fn default() -> ConnectionAttempt
impl Extension for ConnectionAttempt
impl NetExtension for ConnectionAttempt
Auto Trait Implementations§
impl !Freeze for ConnectionAttempt
impl !RefUnwindSafe for ConnectionAttempt
impl Send for ConnectionAttempt
impl Sync for ConnectionAttempt
impl Unpin for ConnectionAttempt
impl UnsafeUnpin for ConnectionAttempt
impl UnwindSafe for ConnectionAttempt
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
§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