FromRequestParts vs FromRequest
pub trait FromRequestParts<S>: Sized {
async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection>;
}
pub trait FromRequest<S, M = ViaRequest>: Sized {
async fn from_request(req: Request, state: &S) -> Result<Self, Self::Rejection>;
}
Because only one extractor can consume the body, Json (or Bytes) must be last in the handler parameter list.