Enum ProxyRouteContext
pub enum ProxyRouteContext {
Route(Arc<ProxyRoute>),
Routes(Arc<ProxyRoutes>),
}net only.Expand description
Requested proxy route or ordered route plan used to scope connection outcomes.
Capture this before route selection and retain it with the attempt: a failure
of one plan says nothing about another plan or a direct connection. Routes and
credentials remain shared. Consult Self::cacheable before sharing outcomes;
equality does not compare opaque route-local extensions.
Variants§
Route(Arc<ProxyRoute>)
A singular requested route; this is not proof of an established proxy.
Routes(Arc<ProxyRoutes>)
A configured route plan, before one route succeeds.
Implementations§
§impl ProxyRouteContext
impl ProxyRouteContext
pub fn from_extensions<'__from_ext>(
ext: &'__from_ext Extensions,
) -> Option<ProxyRouteContext>
pub fn from_extensions<'__from_ext>( ext: &'__from_ext Extensions, ) -> Option<ProxyRouteContext>
Gather the candidate extension pieces from ext in a single pass
and return the variant whose value was inserted most recently.
Generated by #[derive(FromExtensions)]. Each variant names one
candidate type, lookup uses the same rule as Extensions::get_ref
(newest-wins, walks wrappers and the parent chain). When several
candidates are present the one with the lowest traversal rank
(newest) wins, returns None if none are present. If two variants
name the same type they resolve to the same entry (equal rank), the
tie is broken deterministically in favour of the earlier-declared
variant.
§impl ProxyRouteContext
impl ProxyRouteContext
pub fn for_request(extensions: &Extensions) -> Option<ProxyRouteContext>
pub fn for_request(extensions: &Extensions) -> Option<ProxyRouteContext>
Capture the most recently inserted route decision from request metadata.
Plain direct routing returns None; direct plans with opaque policy are retained.
Trait Implementations§
§impl Clone for ProxyRouteContext
impl Clone for ProxyRouteContext
§fn clone(&self) -> ProxyRouteContext
fn clone(&self) -> ProxyRouteContext
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 ProxyRouteContext
impl Debug for ProxyRouteContext
impl Eq for ProxyRouteContext
§impl Hash for ProxyRouteContext
impl Hash for ProxyRouteContext
Auto Trait Implementations§
impl Freeze for ProxyRouteContext
impl RefUnwindSafe for ProxyRouteContext
impl Send for ProxyRouteContext
impl Sync for ProxyRouteContext
impl Unpin for ProxyRouteContext
impl UnsafeUnpin for ProxyRouteContext
impl UnwindSafe for ProxyRouteContext
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