pub enum RedirectReason {
ForwardingDisabled,
Transaction,
Streaming,
LargePayload {
len: usize,
limit: usize,
},
ExplicitlyUnsafe,
}Expand description
Why a non-owner redirected a request instead of forwarding it.
Every redirect happens because the local node is not the owner; the reason explains why the safe-forward path was not taken for this particular request, so an operator (or a client deciding how to retry) can tell a routine “open your transaction on the owner” from a “this node won’t relay” policy.
Variants§
ForwardingDisabled
This node’s RoutingPolicy does not forward; the client must route to
the owner itself. (PRD #987 “when forwarding is not selected”.)
Transaction
A multi-statement transaction — must be opened on the owner directly.
Streaming
A streaming / cursor operation — must originate on the owner.
LargePayload
The payload exceeds the forward budget; send it once, directly to the owner, rather than copying it across an extra internal hop.
ExplicitlyUnsafe
The caller explicitly marked the operation unsafe to forward.
Trait Implementations§
Source§impl Clone for RedirectReason
impl Clone for RedirectReason
Source§fn clone(&self) -> RedirectReason
fn clone(&self) -> RedirectReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RedirectReason
Source§impl Debug for RedirectReason
impl Debug for RedirectReason
Source§impl Display for RedirectReason
impl Display for RedirectReason
impl Eq for RedirectReason
Source§impl PartialEq for RedirectReason
impl PartialEq for RedirectReason
Source§fn eq(&self, other: &RedirectReason) -> bool
fn eq(&self, other: &RedirectReason) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RedirectReason
Auto Trait Implementations§
impl Freeze for RedirectReason
impl RefUnwindSafe for RedirectReason
impl Send for RedirectReason
impl Sync for RedirectReason
impl Unpin for RedirectReason
impl UnsafeUnpin for RedirectReason
impl UnwindSafe for RedirectReason
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request