#[non_exhaustive]pub enum RouteClaim {
ClaimedWithRoute(OperationTarget),
DeferredClaim(OperationTarget),
Claimed,
DeferredRejection(RoutingError),
NoClaim,
}Expand description
A protocol’s answer to whether a request is its own.
A multi-protocol service asks its protocols in priority order and dispatches to the first that definitely claims the request. If none does, the first deferred claim owns it. Once selected, routing errors are terminal and framed by that protocol.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClaimedWithRoute(OperationTarget)
The protocol claims the request and knows the operation. Dispatch directly.
DeferredClaim(OperationTarget)
The protocol can handle the operation if no protocol makes a definite claim. Continue arbitration; the first deferred claim wins over deferred rejections.
Claimed
The protocol claims the request. Call MetadataProtocolRouter::route or
BodyProtocolRouter::route_with_body to select the operation or return a terminal
routing error. No other protocol is asked.
DeferredRejection(RoutingError)
The request signals this protocol but does not meet its claiming requirements. Continue asking other protocols. If none definitely or provisionally claims, the first deferred rejection in precision order is serialized by its protocol.
NoClaim
The protocol does not identify the request; the next protocol is asked.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RouteClaim
impl !RefUnwindSafe for RouteClaim
impl Send for RouteClaim
impl Sync for RouteClaim
impl Unpin for RouteClaim
impl UnsafeUnpin for RouteClaim
impl !UnwindSafe for RouteClaim
Blanket Implementations§
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<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