Expand description
Type-level endpoint wrappers for compile-time enforcement.
These wrappers sit in the API type and enforce constraints at compile time:
Validated<V, E>— validates request bodies before the handler runsVersioned<V, E>— API version routingContentType<C, E>— enforces request content typeRateLimited<E>— declares rate limiting on an endpoint
See also Protected<Auth, E> for authentication.
Structs§
- Content
Type - An endpoint that enforces a specific request Content-Type.
- Form
Content - Built-in form content type marker.
- Json
Content - Built-in JSON content type marker.
- Rate
Limited - An endpoint with declared rate limits.
- Validated
- An endpoint with compile-time validated request bodies.
- Versioned
- An endpoint scoped to a specific API version.
Traits§
- ApiVersion
- A version marker type. Use unit structs for each version.
- Content
Type Marker - A content type marker.
- Rate
Limit - Rate limiting configuration.
- Validate
- Trait for request body validators.