Expand description
§Reinhardt
A full-stack API framework for Rust, inspired by Django and Django REST Framework.
Reinhardt provides a complete, batteries-included solution for building production-ready REST APIs with Rust. It follows Rust’s composition patterns instead of Python’s inheritance model, making full use of traits, generics, and zero-cost abstractions.
§Core Principles
- Composition over Inheritance: Uses Rust’s trait system for composable behavior
- Type Safety: Leverages Rust’s type system for compile-time guarantees
- Zero-Cost Abstractions: High-level ergonomics without runtime overhead
- Async-First: Built on tokio and async/await from the ground up
§Feature Flags
Reinhardt provides flexible feature flags to control compilation and reduce binary size.
§Presets
minimal- Core functionality only (routing, DI, params)full(default) - All features enabledstandard- Balanced for most projectsapi-only- REST API without templates/formsgraphql-server- GraphQL-focused setupwebsocket-server- WebSocket-centric setupcli-tools- CLI and background jobstest-utils- Testing utilities
§Fine-grained Control
Fine-grained feature flags for precise control over included functionality:
§Authentication ✅
auth-jwt- JWT authenticationauth-session- Session-based authenticationauth-oauth- OAuth2 supportauth-token- Token authentication
§Database Backends ✅
db-postgres- PostgreSQL supportdb-mysql- MySQL supportdb-sqlite- SQLite supportdb-cockroachdb- CockroachDB support (distributed transactions)
§Middleware ✅
middleware-cors- CORS (Cross-Origin Resource Sharing) middlewaremiddleware-compression- Response compression (Gzip, Brotli)middleware-security- Security headers (HSTS, XSS Protection, etc.)middleware-rate-limit- Rate limiting and throttling
See Cargo.toml feature definitions for detailed documentation.
§Quick Example
ⓘ
use reinhardt::prelude::*;
use serde::{Serialize, Deserialize};
use std::sync::Arc;
// Define your model (using composition, not inheritance)
#[derive(Debug, Clone, Serialize, Deserialize)]
struct User {
id: Option<i64>,
username: String,
email: String,
}
// Implement Model trait
impl Model for User {
type PrimaryKey = i64;
fn table_name() -> &'static str { "users" }
fn primary_key(&self) -> Option<&Self::PrimaryKey> { self.id.as_ref() }
fn set_primary_key(&mut self, value: Self::PrimaryKey) { self.id = Some(value); }
}
// Create a ViewSet (no inheritance needed!)
let users_viewset = ModelViewSet::<User, JsonSerializer<User>>::new("users");
// Set up routing
let mut router = DefaultRouter::new();
router.register_viewset("users", users_viewset);
// Add middleware using composition
let app = MiddlewareChain::new(Arc::new(router))
.with_middleware(Arc::new(LoggingMiddleware::new()))
.with_middleware(Arc::new(CorsMiddleware::permissive()));Modules§
- accept
restandnative - Accept header parsing
- admin
adminandnative - Admin panel functionality
- apps
coreandnative - Application configuration and registry module.
- auto_
schema openapiandnative - Automatic schema generation from Rust types
- browsable_
api restandnative - Browsable API for Reinhardt
- cache
restandnative - Caching for negotiation results
- commands
commandsandnative - Management commands for Reinhardt framework
- conf
confandnative - Configuration and settings module.
- config
openapiandnative - OpenAPI configuration for endpoint mounting
- core
coreandnative - Core framework types and utilities module.
- db
databaseandnative - Database re-exports for Model derive macro generated code.
- deeplink
deeplinkandnative - Mobile deep linking module.
- dentdelion
dentdelionandnative - Plugin system module.
- detector
restandnative - Content-Type detection from request body
- di
diandnative - Dependency injection module.
- dispatch
dispatchandnative - Request dispatching module.
- encoding
restandnative - Encoding negotiation based on Accept-Encoding header
- endpoint_
inspector openapiandnative - Endpoint Inspector for Function-Based Routes
- endpoints
openapiandnative - OpenAPI endpoint handlers for automatic documentation mounting
- enum_
schema openapiandnative - Advanced enum schema generation
- filters
restandnative - Type-safe filtering backends for Reinhardt framework
- forms
formsandnative - Forms and validation module.
- generator
openapiandnative - OpenAPI schema generator with registry integration
- graphql
graphqlandnative - GraphQL API module.
- grpc
grpcandnative - gRPC service module.
- http
native - HTTP request and response types module.
- i18n
i18nandnative - Internationalization module.
- inventory
- github crates-io docs-rs
- language
restandnative - Language negotiation based on Accept-Language header
- mail
mailandnative - Email sending module.
- media_
type restandnative - Media type representation
- metadata
restandnative - Reinhardt Metadata
- middleware
( standardormiddleware) andnative - Middleware module.
- migrations
databaseandnative - Reinhardt Migrations
- negotiation
restandnative - Content negotiation for request/response formats. Content negotiation for Reinhardt
- negotiator
restandnative - Content negotiator
- openapi
openapiandnative - OpenAPI 3.0 types with Reinhardt extensions
- pages
pages - WASM-based reactive frontend framework with SSR
- pagination
restandnative - Pagination strategies (page-based, cursor, limit-offset).
- param_
metadata openapiandnative - Parameter metadata extraction for OpenAPI schema generation
- parsers
restandnative - Request body parsers (JSON, form, multipart, etc.).
- prelude
native - Convenience re-exports of commonly used types (server-side only).
- query
databaseandnative - SQL query builder module.
- redirect
shortcutsandnative - HTTP redirect helpers (temporary and permanent). Redirect shortcut functions
- registry
openapiandnative - Schema registry for managing reusable component schemas
- rest
restandnative - REST API module.
- reverse
native - URL reverse resolution (name-to-URL mapping).
- schema_
registration openapiandnative - Compile-time schema registration infrastructure
- serde_
attrs openapiandnative - Serde attributes integration for OpenAPI schema generation
- serializers
restandnative - Reinhardt Serializers
- server
serverandnative - Server module - HTTP/HTTP2/WebSocket server implementations
- shortcuts
shortcutsandnative - Shortcut functions for common operations.
- streaming
streaming - Streaming module.
- swagger
openapiandnative - Swagger UI integration
- tasks
tasksandnative - Background tasks module.
- template
templatesandnative - Template and rendering module.
- test
testandnative - Testing utilities module.
- throttling
restandnative - Rate limiting for Reinhardt framework
- urls
native - URL routing module.
- utils
native - Utility functions module.
- utoipa
openapiandnative - Want to have your API documented with OpenAPI? But you don’t want to see the trouble with manual yaml or json tweaking? Would like it to be so easy that it would almost be like utopic? Don’t worry utoipa is just there to fill this gap. It aims to do if not all then the most of heavy lifting for you enabling you to focus writing the actual API logic instead of documentation. It aims to be minimal, simple and fast. It uses simple proc macros which you can use to annotate your code to have items documented.
- versioning
restandnative - Reinhardt Versioning
- views
native - Views module.
Macros§
- collect_
migrations databaseandnative - Collect migrations and register them with the global registry
- define_
views Deprecated native - flatten_
imports native - Function-like proc macro for multi-file view modules.
- installed_
apps coreandnative - Defines installed applications with compile-time validation.
- path
native - Validates URL path syntax at compile time.
Structs§
- APIClient
testandnative - Test client for making API requests
- APIRequest
Factory testandnative - Factory for creating test requests
- APITest
Case testandnative - Base test case for API testing
- Abs
databaseandnative - Abs - absolute value
- Accept
Header Versioning restandnative - Accept header versioning
- Action
native - Action metadata
- Action
Metadata restandnative - Action metadata (for POST, PUT, etc.)
- Advanced
Settings Deprecated confandnative - Main application settings
- Aggregate
databaseandnative - Aggregate expression
- Allow
Any authandnative - AllowAny - grants permission to all requests
- Annotation
databaseandnative - Represents an annotation on a QuerySet
- Anon
Rate Throttle restandnative - Rate throttle for anonymous (unauthenticated) requests.
- Anonymous
User authandnative - Anonymous user - represents a non-authenticated visitor
- AppConfig
coreandnative - Configuration for a single application
- Apps
coreandnative - Main application registry
- Argon2
Hasher authandargon2-hasher - Argon2id password hasher (recommended for new applications)
- Array
Builder openapiandnative - Builder for
Arraywith chainable configuration methods to create a newArray. - Auth
Info authandnative - Lightweight authentication extractor that reads from request extensions.
- Auth
User authandnative - Authenticated user extractor that loads the full user model from database.
- Authentication
Middleware sessionsandmiddlewareandnative - Authentication middleware Extracts user information from session and attaches it to request extensions
- BTree
Index databaseandnative - B-Tree index (default)
- Base
Negotiator restandnative - Base content negotiation implementation (abstract)
- Body
( minimalorstandardordi) andnative - Extract the raw request body as bytes
- Bound
Field formsandnative - BoundField represents a field bound to form data
- Broadcast
Result websocketsandnative - Result of a broadcast operation that tracks individual send outcomes.
- Cache
KeyBuilder cacheandnative - Cache key builder for generating cache keys
- Cache
Middleware middlewareandnative - Cache Middleware
- Cache
Session Backend sessionsandnative - Cache-based session backend
- Cache
Settings confandnative - Cache settings
- Cast
databaseandnative - Cast expression - convert a value to a specific type
- Ceil
databaseandnative - Ceil - round up to nearest integer
- Char
Field formsandnative - Character field with length validation
- Check
Constraint databaseandnative - CHECK constraint (similar to Django’s CheckConstraint)
- Choice
Info restandnative - Choice information for choice fields
- Claims
auth-jwtandnative - JWT Claims
- Client
Path client-router - Single path parameter extractor.
- Client
Path Pattern client-router - Represents a compiled path pattern.
- Client
Route client-router - A single route definition.
- Client
Route Match client-router - A matched route with extracted parameters.
- Client
Router client-router - The main client-side router.
- Client
UrlReverser client-router - Thread-safe reverse URL resolver for client-side routes.
- Components
openapiandnative - Implements OpenAPI Components Object which holds supported reusable objects.
- Concat
databaseandnative - Concat - concatenate multiple strings
- Connection
Pool databaseandnative - A database connection pool
- Consumer
Context websocketsandnative - Consumer context containing connection and message information
- Content
Negotiator restandnative - Content negotiator for selecting appropriate renderer
- Content
Type databaseandnative - Represents a content type (model) in the system
- Content
Type Registry databaseandnative - Registry for managing content types
- Cookie
( minimalorstandardordi) andnative - Extract a value from cookies
- Cookie
Param openapiandnative - Marker type for Cookie parameter metadata
- Cookie
Session Auth Middleware sessionsandmiddlewareandnative - Middleware that authenticates requests via a session cookie.
- Cookie
Session Config sessionsandmiddlewareandnative - Configuration for cookie-based session authentication.
- Core
Settings confandnative - Core application settings.
- Cors
Middleware middleware-corsandnative - CORS middleware
- Cors
Settings confandnative - CORS settings
- Create
Group Data authandnative - Group creation data
- Create
User Data authandnative - User data for creation
- Credit
Card Validator coreandnative - Credit card number validator
- CspConfig
( standardormiddleware) andnative - CSP directive configuration
- CspMiddleware
( standardormiddleware) andnative - Content Security Policy middleware
- CspNonce
( standardormiddleware) andnative - Type wrapper for CSP nonce stored in Request extensions
- Current
Date databaseandnative - CurrentDate - current date
- Current
Time databaseandnative - CurrentTime - current time
- Current
User Deprecated authandnative - Wrapper type representing the currently authenticated user for DI.
- Cursor
Pagination restandnative - Cursor-based pagination for large datasets
- Database
Config confandnative - Database configuration
- Database
Connection databaseandnative - Database connection wrapper
- Default
Router native - Default router implementation Similar to Django REST Framework’s DefaultRouter and Django’s URLResolver
- Default
Source confandnative - Default values configuration source
- Default
User Deprecated authandargon2-hasher - DefaultUser struct - Django’s AbstractUser equivalent
- Default
User Manager authandargon2-hasher - DefaultUserManager - In-memory user manager for DefaultUser
- Dense
Rank databaseandnative - DENSE_RANK window function
- Depends
diandnative - Dependency injection wrapper similar to FastAPI’s Depends.
- Depends
Builder diandnative - Builder for Depends to support FastAPI-style API.
- Detail
View native - DetailView for displaying a single object
- Email
Field formsandnative - Email field with format validation
- Email
Settings confandnative - Email settings
- Email
Validator coreandnative - Email address validator
- Endpoint
Inspector openapiandnative - Endpoint inspector for function-based routes
- Endpoint
Metadata coreandnative - Endpoint metadata for OpenAPI generation
- Enum
Schema Builder openapiandnative - Builder for enum schemas
- EnvSource
confandnative - Environment variable configuration source
- Exists
databaseandnative - Exists - check if a subquery returns any rows
- Extensions
coreandnative - Type-safe extension storage
- Extract
databaseandnative - Extract component from date/time
- F
databaseandnative - F expression - represents a database field reference Similar to Django’s F() objects for database-side operations
- Field
Info restandnative - Field metadata information
- Field
Info Builder restandnative - Builder for field information
- Field
Metadata openapiandnative - Field metadata extracted from serde attributes
- Field
Ref databaseandnative - Type-safe field reference for database operations
- Field
State databaseandnative - Field state for migration detection
- File
Field formsandnative - FileField for file upload
- File
Upload Parser restandnative - Raw file upload parser
- Filter
databaseandnative - Represents a filter.
- First
Value databaseandnative - FIRST_VALUE window function
- Floor
databaseandnative - Floor - round down to nearest integer
- Foreign
KeyConstraint databaseandnative - Foreign Key constraint
- Form
formsandnative - Form data structure (Phase 2-A: Enhanced with client-side validation rules)
- Form
Parser restandnative - Form parser for application/x-www-form-urlencoded content type
- Frame
databaseandnative - Window frame specification
- Generic
Foreign Key databaseandnative - Generic foreign key field
- Generic
Relation Query databaseandnative - Helper for building generic relation queries
- Generic
View Set native - Generic ViewSet without built-in CRUD logic.
- GinIndex
databaseandnative - GIN index (for arrays, JSONB, full-text search)
- Gist
Index databaseandnative - GiST index (for geometric data, full-text search)
- Greatest
databaseandnative - Greatest - return the maximum value among expressions
- Group
authandnative - User group
- Group
Manager authandnative - Group manager
- Hash
Index databaseandnative - Hash index
- Header
( minimalorstandardordi) andnative - Extract a value from request headers
- Header
Param openapiandnative - Marker type for Header parameter metadata
- History
State client-router - State object stored in the history entry.
- Host
Name Versioning restandnative - Hostname versioning
- Http
Session Config sessionsandmiddlewareandnative - HTTP session configuration
- IBAN
Validator coreandnative - IBAN validator implementing ISO 13616 standard
- IPAddress
Validator coreandnative - IP Address validator - validates IPv4 and IPv6 addresses using std::net::IpAddr
- InMemory
Cache cacheandnative - In-memory cache backend
- InMemory
Session Backend sessionsandnative - In-memory session backend
- InMemory
Storage storageandnative - In-memory storage backend
- Index
databaseandnative - Index definition
- Info
openapiandnative - OpenAPI Info object represents metadata of the API.
- Injected
Deprecated diandnative - Injected dependency wrapper
- Injection
Context diandnative - The main injection context for dependency resolution.
- Injection
Context Builder diandnative - Builder for constructing
InjectionContextinstances. - Injection
Metadata diandnative - Injection metadata
- Integer
Field formsandnative - Integer field with range validation
- IsAdmin
User authandnative - IsAdminUser - requires the user to be an admin
- IsAuthenticated
authandnative - IsAuthenticated - requires the user to be authenticated
- JSON
Parser restandnative - JSON parser for application/json content type
- Json
( minimalorstandardordi) andnative - Extract and deserialize JSON from request body
- Json
Serializer restandnative - JSON serializer implementation
- JwtAuth
auth-jwtandnative - JWT Authentication handler
- JwtAuth
Middleware middleware-auth-jwtandnative - JWT authentication middleware for stateless token-based auth.
- Lag
databaseandnative - LAG window function
- Last
Value databaseandnative - LAST_VALUE window function
- Lead
databaseandnative - LEAD window function
- Least
databaseandnative - Least - return the minimum value among expressions
- Length
databaseandnative - Length - return the length of a string
- Limit
Offset Pagination restandnative - Limit/offset based pagination
- List
View native - ListView for displaying multiple objects
- Local
Storage storageandnative - Local filesystem storage
- Logging
Middleware ( standardormiddleware) andnative - Django-style request logging middleware with colored output
- Logging
Settings confandnative - Logging settings
- Login
Required Config ( standardormiddleware) andnative - Configuration for
LoginRequiredMiddleware. - Login
Required Middleware ( standardormiddleware) andnative - Login required middleware.
- LowPriority
EnvSource confandnative - Low-priority environment variable configuration source
- Lower
databaseandnative - Lower - convert string to lowercase
- M2MChange
Event coreandnative - M2M changed signal - sent when many-to-many relationships change
- Media
Settings confandnative - Media files settings
- Media
Type restandnative - Media type representation
- Metadata
Options restandnative - Options for configuring metadata
- Metadata
Response restandnative - Complete metadata response
- Method
native - The Request Method (VERB)
- Middleware
Chain coreandnative - Middleware chain - composes multiple middleware into a single handler.
- Middleware
Config confandnative - Middleware configuration
- Migration
databaseandnative - A database migration
- Migration
Autodetector databaseandnative - Migration autodetector
- Migration
Plan databaseandnative - Migration execution plan
- Migration
Recorder databaseandnative - Migration recorder (in-memory only, for backward compatibility)
- Mod
databaseandnative - Mod - modulo operation
- Model
Form formsandnative - A form that is automatically generated from a Model
- Model
State databaseandnative - Model state for migration detection
- Model
View Set native ModelViewSet- combines all CRUD mixins, backed by a realModelViewSetHandlerfor database-backed CRUD.- Multi
Part Parser restandnative - MultiPart parser for multipart/form-data content type (file uploads)
- Multi
Term Search restandnative - Combines multiple search terms across multiple fields
- NTile
databaseandnative - NTILE window function
- Namespace
Versioning restandnative - Namespace versioning (URL namespace-based)
- Now
databaseandnative - Now - current timestamp
- NthValue
databaseandnative - NTH_VALUE window function
- NullIf
databaseandnative - NullIf - return NULL if two expressions are equal
- Object
Builder openapiandnative - Builder for
Objectwith chainable configuration methods to create a newObject. - Object
Permission authandnative - Object permission with Permission trait support
- Object
Permission Manager authandnative - Object permission manager
- Open
ApiConfig Deprecated openapiandnative - Configuration for OpenAPI endpoint mounting
- Open
ApiRouter openapi-routerandnative - Router wrapper that adds OpenAPI documentation endpoints
- Open
ApiSchema openapiandnative - Root object of the OpenAPI document.
- Operation
openapiandnative - Implements OpenAPI Operation Object object.
- Origin
Guard Middleware ( standardormiddleware) andnative - Middleware that validates the
OriginorRefererheader on state-changing requests as a CSRF protection layer. - Outer
Ref databaseandnative - OuterRef - reference to a field in the outer query (for subqueries)
- Page
Number Pagination restandnative - Page number based pagination
- Pages
Authenticator websockets-pagesandnative - Authenticator that integrates with reinhardt-pages’ Cookie/session authentication
- Paginated
Response restandnative - Paginated response wrapper
- Param
Context client-router - Context for parameter extraction.
- Parameter
openapiandnative - Implements OpenAPI Parameter Object for
Operation. - Path
( minimalorstandardordi) andnative - Extract typed values from URL path parameters.
- Path
Item openapiandnative - Implements OpenAPI Path Item Object what describes
Operations available on a single path. - Path
Matcher native - Path matcher - uses composition to match paths
- Path
Param openapiandnative - Marker type for Path parameter metadata
- Path
Pattern native - Path pattern for URL matching Similar to Django’s URL patterns but using composition
- Persistent
Remote User Middleware sessionsandmiddlewareandnative - Persistent remote user authentication middleware.
- Phone
Number Validator coreandnative - Phone number validator for international phone numbers
- Pool
Config databaseandnative - Represents a pool config.
- Power
databaseandnative - Power - raise to a power
- Project
State databaseandnative - Project state for migration detection
- Query
( minimalorstandardordi) andnative - Extract query parameters from the URL
- Query
Param openapiandnative - Marker type for Query parameter metadata
- Query
Parameter Versioning restandnative - Query parameter versioning
- Query
Set databaseandnative - Represents a query set.
- Rank
databaseandnative - RANK window function
- Read
Only Model View Set native ReadOnlyModelViewSet- exposes onlylistandretrieveagainst a realModelViewSetHandler.- Redis
Cache cacheandredis-backendandnative - Redis cache backend with connection pooling
- Redis
Session Backend session-redisandmiddlewareandnative - Session backend backed by Redis.
- RedocUI
openapiandnative - Redoc UI handler (alternative to Swagger UI)
- Remote
User Middleware sessionsandmiddlewareandnative - Remote user authentication middleware.
- Renderer
Info restandnative - Renderer information for testing
- Request
coreandnative - HTTP Request representation
- Request
Body openapiandnative - Implements OpenAPI Request Body.
- Request
Context diandnative - Context for per-request dependency injection resolution.
- Request
Scope diandnative - Per-request dependency cache that stores resolved instances for the duration of a request.
- Response
coreandnative - HTTP Response representation
- Room
websocketsandnative - A WebSocket room that manages multiple client connections
- Room
Manager websocketsandnative - Manages multiple WebSocket rooms
- Round
databaseandnative - Round - round to specified decimal places
- Route
native - Route definition Uses composition to combine path patterns with handlers Similar to Django’s URLPattern
- RowNumber
databaseandnative - ROW_NUMBER window function
- Savepoint
databaseandnative - Savepoint for nested transactions
- Scheduler
tasksandnative - Task scheduler for managing periodic tasks
- Schema
Builder Ext openapiandnative - Schema builder with serde attribute support
- Schema
Generator openapiandnative - Schema generator for OpenAPI schemas
- Schema
Registration openapiandnative - Compile-time schema registration metadata
- Schema
Registry openapiandnative - A registry for managing reusable OpenAPI schemas
- Scoped
Rate Throttle restandnative - Scope-based rate throttle with per-scope rate limits.
- Security
Config Deprecated middleware-securityandnative - Security middleware configuration
- Security
Middleware middleware-securityandnative - Security middleware for HTTP security headers and redirects
- Security
Settings confandnative - Security-related configuration settings.
- Server
openapiandnative - Represents target server object. It can be used to alter server connection for path operations.
- Server
Router native - Unified router with hierarchical routing support
- Session
sessionsandnative - Django-style session object with dictionary-like interface
- Session
Middleware sessionsandmiddlewareandnative - Session middleware
- Session
Settings confandnative - Session settings
- Settings
Deprecated confandnative - Main settings structure for a Reinhardt project
- Settings
Builder confandnative - Settings builder for layered configuration
- Signal
coreandnative - A signal that can dispatch events to connected receivers
- Simple
Metadata restandnative - Simple metadata implementation
- Simple
User authandnative - Simple user implementation with basic fields
- Singleton
Scope diandnative - Application-wide dependency cache that persists across all requests.
- Soft
Delete databaseandnative - Soft delete field that can be composed into structs
- Sqrt
databaseandnative - Sqrt - square root
- Static
Settings confandnative - Static files settings
- Status
Code native - An HTTP status code (
status-codein RFC 9110 et al.). - Subquery
databaseandnative - Subquery - represents a subquery expression
- Substr
databaseandnative - Substr - extract a substring
- SwaggerUI
openapiandnative - Swagger UI handler
- Tag
openapiandnative - Implements OpenAPI Tag Object.
- Task
Queue tasksandnative - A task queue that delegates to a backend for task storage and retrieval.
- Template
Config confandnative - Template engine configuration
- Test
Response testandnative - Test response wrapper
- Timestamps
databaseandnative - Common timestamp fields that can be composed into structs
- Toml
File Source confandnative - TOML file configuration source
- Transaction
databaseandnative - Transaction manager
- Transaction
Scope databaseandnative - Transaction scope guard with automatic rollback on drop
- Trim
databaseandnative - Trim - remove leading and trailing whitespace
- URLPath
Versioning restandnative - URL path versioning
- Unified
Router client-router - Unified router combining server and client routing capabilities.
- Unique
Constraint databaseandnative - UNIQUE constraint (similar to Django’s UniqueConstraint)
- Update
User Data authandnative - User data for update
- Upper
databaseandnative - Upper - convert string to uppercase
- UrlPatterns
Registration native - URL patterns registration for compile-time discovery
- UrlReverser
native - URL reverser for resolving names back to URLs Similar to Django’s URLResolver reverse functionality
- UrlValidator
coreandnative - URL validator
- User
Manager authandnative - User manager
- User
Rate Throttle restandnative - Rate throttle for authenticated user requests.
- Validation
Errors coreandnative - Aggregates validation errors by field name.
- Versioning
Middleware restandnative - Middleware for automatic API version detection
- WebSocket
Connection websocketsandnative - WebSocket connection with activity tracking and timeout support
- WebSocket
Route websocketsandnative - A registered WebSocket route (path + optional name + metadata).
- WebSocket
Router websocketsandnative - WebSocket router: build-time registration + runtime lookup.
- Window
databaseandnative - Window specification
- XFrame
Options Middleware ( standardormiddleware) andnative - X-Frame-Options middleware for clickjacking protection
Enums§
- Action
Type native - Action type for ViewSet operations
- Aggregate
Func databaseandnative - Aggregate function types
- Aggregate
Value databaseandnative - Result of an aggregation
- Annotation
Value databaseandnative - Represents an annotation value that can be added to a QuerySet
- AppError
coreandnative - Errors that can occur when working with the application registry
- Database
Backend databaseandnative - Defines possible database backend values.
- DiError
diandnative - Errors that can occur during dependency injection resolution.
- Enum
Tagging openapiandnative - Enum tagging strategy
- Error
coreandnative - The main error type for the Reinhardt framework.
- Extract
Component databaseandnative - Defines possible extract component values.
- Field
Error formsandnative - Error type returned when field validation fails.
- Field
Type restandnative - Field type enumeration for metadata
- Filter
Error restandnative - Errors that can occur during query filtering.
- Filter
Operator databaseandnative - Defines possible filter operator values.
- Filter
Value databaseandnative - Defines possible filter value values.
- Form
Error formsandnative - Error type returned when form-level validation fails.
- Frame
Boundary databaseandnative - Frame boundary
- Frame
Type databaseandnative - Window frame type
- Group
Management Error authandnative - Group management error
- Isolation
Level databaseandnative - Transaction isolation levels
- JwtError
auth-jwtandnative - JWT-specific errors with distinct variants for each failure mode.
- M2MAction
coreandnative - Actions that can occur on a many-to-many relationship.
- Message
websocketsandnative - WebSocket message types
- Migration
Error databaseandnative - Errors that can occur during migration operations.
- Navigation
Type client-router - The type of navigation that occurred.
- Negotiation
Error restandnative - Error type for negotiation failures
- Number
openapiandnative - Flexible number wrapper used by validation schema attributes to seamlessly support different number syntaxes.
- OnDelete
databaseandnative - Defines possible on delete values.
- OnUpdate
databaseandnative - Defines possible on update values.
- Order
databaseandnative - Ordering direction for ORDER BY clauses.
- Parameter
Location openapiandnative - In definition of
Parameter. - Pool
Error databaseandnative - Defines possible pool error values.
- Profile
confandnative - Application profile/environment
- Q
databaseandnative - Q object - represents a complex query condition Similar to Django’s Q() objects for building complex queries
- QOperator
databaseandnative - Q operator for combining query conditions
- Query
Builder Value databaseandnative - Core value representation for SQL parameters.
- Query
Value databaseandnative - Query value types
- RefOr
openapiandnative - A
Refor some other typeT. - Rename
All openapiandnative - Rename transformation strategy
- Required
openapiandnative - Value used to indicate whether parameter or property is required.
- Room
Error websocketsandnative - Error types for room operations
- Route
Error websocketsandnative - Routing errors for WebSocket routes
- Router
Factory native - Factory for creating server routers, supporting both sync and async creation.
- Same
Site sessionsandmiddlewareandnative - SameSite cookie attribute
- Schema
openapiandnative - Is super type for OpenAPI Schema Object. Schema is reusable resource what can be
referenced from path operations and other components using
Ref. - Schema
Error openapiandnative - Errors that can occur during OpenAPI schema operations.
- Scope
diandnative - Defines the lifetime scope of a dependency.
- Session
Error sessionsandnative - Session backend errors
- Settings
Error confandnative - Settings error
- SqlType
databaseandnative - Defines possible sql type values.
- Trim
Type databaseandnative - Defines possible trim type values.
- User
Management Error authandnative - User management error
- Validator
Error coreandnative - Validation errors produced by validators.
- Versioning
Error restandnative - Errors that can occur during API version determination.
- WebSocket
Error websocketsandnative - Errors that can occur during WebSocket operations.
- XFrame
Options ( standardormiddleware) andnative - X-Frame-Options values
Statics§
- CONTENT_
TYPE_ REGISTRY databaseandnative - Global content type registry.
Traits§
- Apply
Update - Trait for applying partial updates from one struct to another.
- Auth
Backend authandnative - Authentication backend trait
- Base
Content Negotiation restandnative - Base content negotiator trait
- Base
Metadata restandnative - Base trait for metadata providers
- Base
User authandnative - BaseUser trait - Django-style authentication
- Base
Versioning restandnative - Base trait for API versioning strategies
- Cache
cacheandnative - Base cache trait
- Client
UrlResolver - Trait for resolving client-side (frontend) URLs by route name.
- Components
Ext openapiandnative - Extension trait for Components to provide convenient methods
- Constraint
databaseandnative - Base trait for all constraints
- Create
Mixin native - Create mixin - provides create() action
- Deserializer
restandnative - Deserializer trait for one-way deserialization
- Destroy
Mixin native - Destroy mixin - provides destroy() action
- Field
Ordering Ext restandnative - Extension trait to add ordering methods to Field
- Filter
Backend restandnative - A backend that applies query parameter filters to a SQL query string.
- From
Path client-router - Trait for extracting typed values from path parameters.
- Full
User authandnative - FullUser trait - Django’s AbstractUser equivalent
- Generic
Relatable databaseandnative - Trait for models that can be targets of generic relations
- Handler
coreandnative - Handler trait for processing requests.
- HasCore
Settings confandnative - Trait for accessing the settings fragment from a composed settings type.
- HasSettings
confandnative - Generic accessor trait for settings fragments.
- Injectable
diandnative - Injectable trait for dependencies.
- Into
Value databaseandnative - Trait for converting Rust types to SQL values.
- List
Mixin native - Mixin traits for ViewSet functionality These use composition instead of multiple inheritance List mixin - provides list() action
- Middleware
coreandnative - Middleware trait for request/response processing.
- Model
databaseandnative - Core trait for database models Uses composition instead of inheritance - models can implement multiple traits
- Model
Type databaseandnative - Trait for models that can be registered as content types
- Multiple
Object Mixin native - Trait for views that work with multiple objects
- Object
Permission Checker authandnative - Object permission checker trait
- Open
ApiSchema Ext openapiandnative - Extension trait for OpenApiSchema to provide convenient methods
- Operation
Ext openapiandnative - Extension trait for Operation to provide convenient methods
- Paginator
restandnative - Trait for pagination implementations
- Parameter
Ext openapiandnative - Extension trait for Parameter to provide convenient constructors
- Parameter
Metadata openapiandnative - Trait for types that can provide OpenAPI parameter metadata
- Parser
restandnative - Trait for request body parsers
- Password
Hasher authandnative - Password hasher trait
- Path
Item Ext openapiandnative - Extension trait for PathItem to provide constructor
- Permission
authandnative - Permission trait - defines permission checking interface
- Permissions
Mixin authandnative - PermissionsMixin trait - Django’s PermissionsMixin equivalent
- Request
Version Ext restandnative - Extension trait to get API version from request
- Responses
Ext openapiandnative - Extension trait for Responses to provide collection methods
- Retrieve
Mixin native - Retrieve mixin - provides retrieve() action
- Router
native - Router trait - composes routes together
- Schema
Ext openapiandnative - Extension trait for Schema to provide convenient constructor methods
- Serializer
restandnative - Core serializer trait for converting between input and output representations
- Session
Backend sessionsandnative - Session backend trait
- Settings
Fragment confandnative - A composable unit of configuration.
- Single
From Path client-router - Trait for extracting a single value at a specific index from path parameters.
- Single
Object Mixin native - Trait for views that work with a single object
- Soft
Deletable databaseandnative - Trait for soft-deletable models Another composition trait instead of inheritance
- Storage
storageandnative - Trait for file storage backends
- Task
tasksandnative - Core trait that all tasks must implement, providing identity and metadata.
- Task
Executor tasksandnative - Trait for tasks that can be executed asynchronously.
- Throttle
restandnative - Core trait for rate-limiting strategies.
- Timestamped
databaseandnative - Trait for models with timestamps - compose this with Model This follows Rust’s composition pattern rather than Django’s inheritance
- ToSchema
openapiandnative - Trait for types that can generate OpenAPI schemas
- Transaction
Executor databaseandnative - Transaction executor trait for database-specific transaction handling
- Update
Mixin native - Update mixin - provides update() action
- UrlPattern
native - Trait for URL patterns that can be reversed at compile time
- UrlPattern
With Params native - Trait for URL patterns with parameters
- UrlResolver
native - Base trait for type-safe URL resolution.
- Validate
coreandnative - Trait for struct-level validation.
- Validator
coreandnative - Trait for validators
- View
native - Base trait for all generic views
- ViewSet
native - ViewSet trait - similar to Django REST Framework’s ViewSet Uses composition of mixins instead of inheritance
- WebSocket
Consumer websocketsandnative - WebSocket consumer trait
- WebSocket
UrlResolver native - Trait for resolving WebSocket endpoint URLs by route name.
- Window
Function databaseandnative - Base trait for window functions
Functions§
- atomic
databaseandnative - Execute a function within a transaction scope
- atomic_
with_ isolation databaseandnative - Execute a function within a transaction with specific isolation level
- clear_
client_ reverser client-router - Clear the registered client reverser.
- clear_
router native - Clear the registered router (useful for tests)
- clear_
websocket_ router websocketsandnative - Clears the process-wide WebSocket router (primarily for tests).
- generate_
openapi_ schema openapiandnative - Generate OpenAPI schema from global registry
- get_
client_ reverser client-router - Retrieve the globally registered
ClientUrlReverser. - get_
list_ or_ 404 shortcutsanddatabaseandnative - Get a list of objects from the database or return a 404 response if empty
- get_
object_ or_ 404 shortcutsanddatabaseandnative - Get a single object from the database or return a 404 response
- get_
router native - Get a reference to the globally registered router
- get_
websocket_ router websocketsandnative - Returns a clone of the current process-wide WebSocket router, if set.
- include
native - Create an IncludedRouter from a list of routes Similar to Django’s include() function
- is_
router_ registered native - Check if a router has been registered
- m2m_
changed coreandnative - Returns the M2M changed signal for the given model types.
- path
native - Create a route using simple path syntax Similar to Django’s path() function
- post_
delete coreandnative - Post-delete signal - sent after a model instance is deleted
- post_
save coreandnative - Post-save signal - sent after a model instance is saved
- pre_
delete coreandnative - Pre-delete signal - sent before a model instance is deleted
- pre_
save coreandnative - Pre-save signal - sent before a model instance is saved
- re_path
native - Create a route using regex syntax Similar to Django’s re_path() function
- redirect
shortcutsandnative - Create a validated temporary redirect (HTTP 302) to the specified URL.
- register_
client_ reverser client-router - Register a
ClientUrlReverserglobally. - register_
router native - Register the application’s main router globally
- register_
router_ arc native - Register a router that is already wrapped in Arc.
- register_
websocket_ router websocketsandnative - Installs
routeras the process-wide WebSocket router. - render_
html shortcutsandnative - Render a simple HTML string and return an HTTP 200 response
- render_
json shortcutsandnative - Render data as JSON and return an HTTP 200 response, or an error if serialization fails
- render_
text shortcutsandnative - Render a simple text string and return an HTTP 200 response
- reverse
native - Standalone reverse function for convenience Similar to Django’s reverse() function
- reverse_
websocket_ url websocketsandnative - Resolves a registered or pending WebSocket URL by route name.
- validate_
auth_ extractors authandnative - Validates that the DI context is properly configured for auth extractors.
Type Aliases§
- AppResult
coreandnative - A specialized
Resulttype for application operations. - Context
native - Context data for template rendering
- DiResult
diandnative - A specialized
Resulttype for dependency injection operations. - Filter
Result restandnative - A convenience type alias for filter operation results.
- Form
Result formsandnative - Result type alias for form-level operations.
- Group
Management Result authandnative - Group management result
- Optional
Injected Deprecated diandnative - Optional injected dependency
- Parse
Error restandnative - Type alias for parser errors, using the framework’s
Errortype. - Parse
Result restandnative - Type alias for parser results, using the framework’s
Resulttype. - Result
coreandnative - A convenient
Resulttype alias usingreinhardt_core::exception::Erroras the error type. - Room
Result websocketsandnative - A specialized
Resulttype for room operations. - Route
Result websocketsandnative - Routing result type
- Schema
Object openapiandnative - A complete schema object with metadata This is an alias to utoipa’s Schema for convenience
- Schema
Result openapiandnative - Result type for OpenAPI schema operations.
- User
Management Result authandnative - User management result
- Validation
Result coreandnative - Result type for validation operations.
- View
Result coreandnative - A convenient type alias for view/endpoint function return types.
- WebSocket
Result websocketsandnative - A specialized
Resulttype for WebSocket operations.
Attribute Macros§
- admin
adminandnative - Attribute macro for ModelAdmin configuration
- api_
view native - Decorator for function-based API views
- app_
config coreandnative - Attribute macro for Django-style AppConfig definition with automatic derive
- apply_
update native - Attribute macro for applying partial updates to target structs
- delete
native - DELETE method decorator
- get
native - GET method decorator
- model
databaseandnative - Attribute macro for Django-style model definition with automatic derive
- patch
native - PATCH method decorator
- post
native - POST method decorator
- put
native - PUT method decorator
- routes
native - Register URL patterns for automatic discovery by the framework
- settings
confandnative - Settings attribute macro for composable configuration.
- url_
patterns native - Aggregate URL resolver traits from endpoint view modules.
- viewset
native - Generate URL resolver traits for a ViewSet function.
Derive Macros§
- AppConfig
coreandnative - Derive macro for automatic AppConfig factory method generation
- Derive
Apply Update native - Derive macro for automatic
ApplyUpdatetrait implementation - Model
databaseandnative - Derive macro for automatic Model implementation and migration registration
- Schema
openapiandnative - Derive macro for automatic OpenAPI schema generation.
- Validate
coreandnative - Derive macro for struct-level validation