pub fn rate_limiter(limiter: Arc<dyn RateLimiter>, limit: u32) -> MiddlewareExpand description
Builds middleware enforcing limit requests per minute per caller.
The caller key is the context’s user id, or the x-forwarded-for header value
falling back to "anonymous". Over-limit requests fail with a 429 ErrorResult.