#[non_exhaustive]pub enum BodyRouteClaim {
ClaimedWithRoute(OperationTarget),
DeferredClaim(OperationTarget),
Claimed,
NeedsBodyToClaim,
DeferredRejection(RoutingError),
NoClaim,
}Expand description
A body-routed protocol’s answer to whether a request is its own.
Distinct from RouteClaim so that needing the body stays unrepresentable for metadata
protocols. Routing errors are returned by BodyProtocolRouter::route_with_body after
the protocol claims the request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClaimedWithRoute(OperationTarget)
The protocol claims the request and knows the operation. Dispatch directly without
calling BodyProtocolRouter::route_with_body.
DeferredClaim(OperationTarget)
Offer an operation without collecting the body. A later definite claim wins; otherwise the first deferred claim in precision order is dispatched.
Claimed
The protocol claims the request. The service collects the complete body,
then calls BodyProtocolRouter::route_with_body.
No other protocol is asked, including when routing returns an error.
NeedsBodyToClaim
The protocol needs body bytes to decide whether the request is its own. The service
collects the complete body and calls BodyProtocolRouter::claim_with_body.
DeferredRejection(RoutingError)
Defer a rejection from the head without collecting the body. A later claim wins; otherwise a deferred claim wins, or the first deferred rejection supplies the response.
NoClaim
The request is not this protocol’s; the next protocol is asked.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BodyRouteClaim
impl !RefUnwindSafe for BodyRouteClaim
impl Send for BodyRouteClaim
impl Sync for BodyRouteClaim
impl Unpin for BodyRouteClaim
impl UnsafeUnpin for BodyRouteClaim
impl !UnwindSafe for BodyRouteClaim
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