Skip to main content

Crate runlimit_axum

Crate runlimit_axum 

Source
Expand description

Caller-controlled Axum admission middleware for Runlimit.

RateLimitLayer evaluates one runlimit_core::Check before calling the wrapped service. Applications supply both trust-sensitive operations:

This crate never interprets forwarding headers, connection metadata, or application identities. It also does not select response status codes, bodies, or headers. A shadow denial permits the request and is available to downstream code as a runlimit_core::Decision request extension, just like an allowed decision.

Structs§

RateLimitLayer
A Tower layer that performs one Runlimit admission check per request.
RateLimitService
The service produced by RateLimitLayer.
ResponseFuture
The boxed, sendable response future returned by RateLimitService.

Enums§

RateLimitRejection
A rate-limit rejection handed to the application-owned response mapper.
RejectionKind
The non-sensitive category of a RateLimitRejection.

Traits§

ExtractSubjectKey
A synchronous, application-owned request-to-subject-key boundary.