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
restand non-WebAssembly - Accept header parsing
- admin
adminand non-WebAssembly - Admin panel functionality
- apps
coreand non-WebAssembly - Application configuration and registry module.
- auto_
schema openapiand non-WebAssembly - Automatic schema generation from Rust types
- browsable_
api restand non-WebAssembly - Browsable API for Reinhardt
- cache
restand non-WebAssembly - Caching for negotiation results
- commands
commandsand non-WebAssembly - Management commands for Reinhardt framework
- conf
confand non-WebAssembly - Configuration and settings module.
- config
openapiand non-WebAssembly - OpenAPI configuration for endpoint mounting
- core
coreand non-WebAssembly - Core framework types and utilities module.
- db
databaseand non-WebAssembly - Database re-exports for Model derive macro generated code.
- deeplink
deeplinkand non-WebAssembly - Mobile deep linking module.
- dentdelion
dentdelionand non-WebAssembly - Plugin system module.
- detector
restand non-WebAssembly - Content-Type detection from request body
- di
diand non-WebAssembly - Dependency injection module.
- dispatch
dispatchand non-WebAssembly - Request dispatching module.
- encoding
restand non-WebAssembly - Encoding negotiation based on Accept-Encoding header
- endpoint_
inspector openapiand non-WebAssembly - Endpoint Inspector for Function-Based Routes
- endpoints
openapiand non-WebAssembly - OpenAPI endpoint handlers for automatic documentation mounting
- enum_
schema openapiand non-WebAssembly - Advanced enum schema generation
- filters
restand non-WebAssembly - Type-safe filtering backends for Reinhardt framework
- forms
formsand non-WebAssembly - Forms and validation module.
- generator
openapiand non-WebAssembly - OpenAPI schema generator with registry integration
- graphql
graphqland non-WebAssembly - GraphQL API module.
- grpc
grpcand non-WebAssembly - gRPC service module.
- http
Non-WebAssembly - HTTP request and response types module.
- i18n
i18nand non-WebAssembly - Internationalization module.
- inventory
- github crates-io docs-rs
- language
restand non-WebAssembly - Language negotiation based on Accept-Language header
- mail
mailand non-WebAssembly - Email sending module.
- media_
type restand non-WebAssembly - Media type representation
- metadata
restand non-WebAssembly - Reinhardt Metadata
- middleware
( standardormiddleware) and non-WebAssembly - Middleware module.
- migrations
databaseand non-WebAssembly - Reinhardt Migrations
- negotiation
restand non-WebAssembly - Content negotiation for request/response formats. Content negotiation for Reinhardt
- negotiator
restand non-WebAssembly - Content negotiator
- openapi
openapiand non-WebAssembly - OpenAPI 3.0 types with Reinhardt extensions
- pages
pages - WASM-based reactive frontend framework with SSR
- pagination
restand non-WebAssembly - Pagination strategies (page-based, cursor, limit-offset).
- param_
metadata openapiand non-WebAssembly - Parameter metadata extraction for OpenAPI schema generation
- parsers
restand non-WebAssembly - Request body parsers (JSON, form, multipart, etc.).
- prelude
Non-WebAssembly - Convenience re-exports of commonly used types (server-side only).
- query
databaseand non-WebAssembly - SQL query builder module.
- redirect
shortcutsand non-WebAssembly - HTTP redirect helpers (temporary and permanent). Redirect shortcut functions
- registry
openapiand non-WebAssembly - Schema registry for managing reusable component schemas
- rest
restand non-WebAssembly - REST API module.
- reverse
Non-WebAssembly - URL reverse resolution (name-to-URL mapping).
- schema_
registration openapiand non-WebAssembly - Compile-time schema registration infrastructure
- serde_
attrs openapiand non-WebAssembly - Serde attributes integration for OpenAPI schema generation
- serializers
restand non-WebAssembly - Reinhardt Serializers
- server
serverand non-WebAssembly - Server module - HTTP/HTTP2/WebSocket server implementations
- shortcuts
shortcutsand non-WebAssembly - Shortcut functions for common operations.
- swagger
openapiand non-WebAssembly - Swagger UI integration
- tasks
tasksand non-WebAssembly - Background tasks module.
- template
templatesand non-WebAssembly - Template and rendering module.
- test
testand non-WebAssembly - Testing utilities module.
- throttling
restand non-WebAssembly - Rate limiting for Reinhardt framework
- urls
Non-WebAssembly - URL routing module.
- utils
Non-WebAssembly - Utility functions module.
- utoipa
openapiand non-WebAssembly - 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
restand non-WebAssembly - Reinhardt Versioning
- views
Non-WebAssembly - Views module.
Macros§
- collect_
migrations databaseand non-WebAssembly - Collect migrations and register them with the global registry
- installed_
apps coreand non-WebAssembly - Defines installed applications with compile-time validation.
- path
Non-WebAssembly - Validates URL path syntax at compile time.
Structs§
- APIClient
testand non-WebAssembly - Test client for making API requests
- APIRequest
Factory testand non-WebAssembly - Factory for creating test requests
- APITest
Case testand non-WebAssembly - Base test case for API testing
- Abs
databaseand non-WebAssembly - Abs - absolute value
- Accept
Header Versioning restand non-WebAssembly - Accept header versioning
- Action
Non-WebAssembly - Action metadata
- Action
Metadata restand non-WebAssembly - Action metadata (for POST, PUT, etc.)
- Advanced
Settings Deprecated confand non-WebAssembly - Main application settings
- Aggregate
databaseand non-WebAssembly - Aggregate expression
- Allow
Any authand non-WebAssembly - AllowAny - grants permission to all requests
- Annotation
databaseand non-WebAssembly - Represents an annotation on a QuerySet
- Anon
Rate Throttle restand non-WebAssembly - Rate throttle for anonymous (unauthenticated) requests.
- Anonymous
User authand non-WebAssembly - Anonymous user - represents a non-authenticated visitor
- AppConfig
coreand non-WebAssembly - Configuration for a single application
- Apps
coreand non-WebAssembly - Main application registry
- Argon2
Hasher authandargon2-hasher - Argon2id password hasher (recommended for new applications)
- Array
Builder openapiand non-WebAssembly - Builder for
Arraywith chainable configuration methods to create a newArray. - Auth
Info authand non-WebAssembly - Lightweight authentication extractor that reads from request extensions.
- Auth
User authand non-WebAssembly - Authenticated user extractor that loads the full user model from database.
- Authentication
Middleware sessionsandmiddlewareand non-WebAssembly - Authentication middleware Extracts user information from session and attaches it to request extensions
- BTree
Index databaseand non-WebAssembly - B-Tree index (default)
- Base
Negotiator restand non-WebAssembly - Base content negotiation implementation (abstract)
- Body
( minimalorstandardordi) and non-WebAssembly - Extract the raw request body as bytes
- Bound
Field formsand non-WebAssembly - BoundField represents a field bound to form data
- Cache
KeyBuilder cacheand non-WebAssembly - Cache key builder for generating cache keys
- Cache
Middleware middlewareand non-WebAssembly - Cache Middleware
- Cache
Session Backend sessionsand non-WebAssembly - Cache-based session backend
- Cache
Settings confand non-WebAssembly - Cache settings
- Cast
databaseand non-WebAssembly - Cast expression - convert a value to a specific type
- Ceil
databaseand non-WebAssembly - Ceil - round up to nearest integer
- Char
Field formsand non-WebAssembly - Character field with length validation
- Check
Constraint databaseand non-WebAssembly - CHECK constraint (similar to Django’s CheckConstraint)
- Choice
Info restand non-WebAssembly - Choice information for choice fields
- Claims
auth-jwtand non-WebAssembly - 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.
- Components
openapiand non-WebAssembly - Implements OpenAPI Components Object which holds supported reusable objects.
- Concat
databaseand non-WebAssembly - Concat - concatenate multiple strings
- Connection
Pool databaseand non-WebAssembly - A database connection pool
- Consumer
Context websocketsand non-WebAssembly - Consumer context containing connection and message information
- Content
Negotiator restand non-WebAssembly - Content negotiator for selecting appropriate renderer
- Content
Type databaseand non-WebAssembly - Represents a content type (model) in the system
- Content
Type Registry databaseand non-WebAssembly - Registry for managing content types
- Cookie
( minimalorstandardordi) and non-WebAssembly - Extract a value from cookies
- Cookie
Param openapiand non-WebAssembly - Marker type for Cookie parameter metadata
- Core
Settings confand non-WebAssembly - Core application settings.
- Cors
Middleware middleware-corsand non-WebAssembly - CORS middleware
- Cors
Settings confand non-WebAssembly - CORS settings
- Create
Group Data authand non-WebAssembly - Group creation data
- Create
User Data authand non-WebAssembly - User data for creation
- Credit
Card Validator coreand non-WebAssembly - Credit card number validator
- Current
Date databaseand non-WebAssembly - CurrentDate - current date
- Current
Time databaseand non-WebAssembly - CurrentTime - current time
- Current
User Deprecated authand non-WebAssembly - Wrapper type representing the currently authenticated user for DI.
- Cursor
Pagination restand non-WebAssembly - Cursor-based pagination for large datasets
- Database
Config confand non-WebAssembly - Database configuration
- Database
Connection databaseand non-WebAssembly - Database connection wrapper
- Default
Router Non-WebAssembly - Default router implementation Similar to Django REST Framework’s DefaultRouter and Django’s URLResolver
- Default
Source confand non-WebAssembly - 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 databaseand non-WebAssembly - DENSE_RANK window function
- Depends
diand non-WebAssembly - Dependency injection wrapper similar to FastAPI’s Depends.
- Depends
Builder diand non-WebAssembly - Builder for Depends to support FastAPI-style API.
- Detail
View Non-WebAssembly - DetailView for displaying a single object
- Email
Field formsand non-WebAssembly - Email field with format validation
- Email
Settings confand non-WebAssembly - Email settings
- Email
Validator coreand non-WebAssembly - Email address validator
- Endpoint
Inspector openapiand non-WebAssembly - Endpoint inspector for function-based routes
- Endpoint
Metadata coreand non-WebAssembly - Endpoint metadata for OpenAPI generation
- Enum
Schema Builder openapiand non-WebAssembly - Builder for enum schemas
- EnvSource
confand non-WebAssembly - Environment variable configuration source
- Exists
databaseand non-WebAssembly - Exists - check if a subquery returns any rows
- Extensions
coreand non-WebAssembly - Type-safe extension storage
- Extract
databaseand non-WebAssembly - Extract component from date/time
- F
databaseand non-WebAssembly - F expression - represents a database field reference Similar to Django’s F() objects for database-side operations
- Field
Info restand non-WebAssembly - Field metadata information
- Field
Info Builder restand non-WebAssembly - Builder for field information
- Field
Metadata openapiand non-WebAssembly - Field metadata extracted from serde attributes
- Field
Ref databaseand non-WebAssembly - Type-safe field reference for database operations
- Field
State databaseand non-WebAssembly - Field state for migration detection
- File
Field formsand non-WebAssembly - FileField for file upload
- File
Upload Parser restand non-WebAssembly - Raw file upload parser
- Filter
databaseand non-WebAssembly - Represents a filter.
- First
Value databaseand non-WebAssembly - FIRST_VALUE window function
- Floor
databaseand non-WebAssembly - Floor - round down to nearest integer
- Foreign
KeyConstraint databaseand non-WebAssembly - Foreign Key constraint
- Form
formsand non-WebAssembly - Form data structure (Phase 2-A: Enhanced with client-side validation rules)
- Form
Parser restand non-WebAssembly - Form parser for application/x-www-form-urlencoded content type
- Frame
databaseand non-WebAssembly - Window frame specification
- Generic
Foreign Key databaseand non-WebAssembly - Generic foreign key field
- Generic
Relation Query databaseand non-WebAssembly - Helper for building generic relation queries
- Generic
View Set Non-WebAssembly - Generic ViewSet implementation Composes functionality through trait bounds
- GinIndex
databaseand non-WebAssembly - GIN index (for arrays, JSONB, full-text search)
- Gist
Index databaseand non-WebAssembly - GiST index (for geometric data, full-text search)
- Greatest
databaseand non-WebAssembly - Greatest - return the maximum value among expressions
- Group
authand non-WebAssembly - User group
- Group
Manager authand non-WebAssembly - Group manager
- Hash
Index databaseand non-WebAssembly - Hash index
- Header
( minimalorstandardordi) and non-WebAssembly - Extract a value from request headers
- Header
Param openapiand non-WebAssembly - Marker type for Header parameter metadata
- History
State client-router - State object stored in the history entry.
- Host
Name Versioning restand non-WebAssembly - Hostname versioning
- Http
Session Config sessionsandmiddlewareand non-WebAssembly - HTTP session configuration
- IBAN
Validator coreand non-WebAssembly - IBAN validator implementing ISO 13616 standard
- IPAddress
Validator coreand non-WebAssembly - IP Address validator - validates IPv4 and IPv6 addresses using std::net::IpAddr
- InMemory
Cache cacheand non-WebAssembly - In-memory cache backend
- InMemory
Session Backend sessionsand non-WebAssembly - In-memory session backend
- InMemory
Storage storageand non-WebAssembly - In-memory storage backend
- Index
databaseand non-WebAssembly - Index definition
- Info
openapiand non-WebAssembly - OpenAPI Info object represents metadata of the API.
- Injected
diand non-WebAssembly - Injected dependency wrapper
- Injection
Context diand non-WebAssembly - The main injection context for dependency resolution.
- Injection
Context Builder diand non-WebAssembly - Builder for constructing
InjectionContextinstances. - Injection
Metadata diand non-WebAssembly - Injection metadata
- Integer
Field formsand non-WebAssembly - Integer field with range validation
- IsAdmin
User authand non-WebAssembly - IsAdminUser - requires the user to be an admin
- IsAuthenticated
authand non-WebAssembly - IsAuthenticated - requires the user to be authenticated
- JSON
Parser restand non-WebAssembly - JSON parser for application/json content type
- Json
( minimalorstandardordi) and non-WebAssembly - Extract and deserialize JSON from request body
- Json
Serializer restand non-WebAssembly - JSON serializer implementation
- JwtAuth
auth-jwtand non-WebAssembly - JWT Authentication handler
- Lag
databaseand non-WebAssembly - LAG window function
- Last
Value databaseand non-WebAssembly - LAST_VALUE window function
- Lead
databaseand non-WebAssembly - LEAD window function
- Least
databaseand non-WebAssembly - Least - return the minimum value among expressions
- Length
databaseand non-WebAssembly - Length - return the length of a string
- Limit
Offset Pagination restand non-WebAssembly - Limit/offset based pagination
- List
View Non-WebAssembly - ListView for displaying multiple objects
- Local
Storage storageand non-WebAssembly - Local filesystem storage
- Logging
Middleware ( standardormiddleware) and non-WebAssembly - Django-style request logging middleware with colored output
- Logging
Settings confand non-WebAssembly - Logging settings
- LowPriority
EnvSource confand non-WebAssembly - Low-priority environment variable configuration source
- Lower
databaseand non-WebAssembly - Lower - convert string to lowercase
- M2MChange
Event coreand non-WebAssembly - M2M changed signal - sent when many-to-many relationships change
- Media
Settings confand non-WebAssembly - Media files settings
- Media
Type restand non-WebAssembly - Media type representation
- Metadata
Options restand non-WebAssembly - Options for configuring metadata
- Metadata
Response restand non-WebAssembly - Complete metadata response
- Method
Non-WebAssembly - The Request Method (VERB)
- Middleware
Chain coreand non-WebAssembly - Middleware chain - composes multiple middleware into a single handler.
- Middleware
Config confand non-WebAssembly - Middleware configuration
- Migration
databaseand non-WebAssembly - A database migration
- Migration
Autodetector databaseand non-WebAssembly - Migration autodetector
- Migration
Plan databaseand non-WebAssembly - Migration execution plan
- Migration
Recorder databaseand non-WebAssembly - Migration recorder (in-memory only, for backward compatibility)
- Mod
databaseand non-WebAssembly - Mod - modulo operation
- Model
Form formsand non-WebAssembly - A form that is automatically generated from a Model
- Model
State databaseand non-WebAssembly - Model state for migration detection
- Model
View Set Non-WebAssembly - ModelViewSet - combines all CRUD mixins Similar to Django REST Framework’s ModelViewSet but using composition
- Multi
Part Parser restand non-WebAssembly - MultiPart parser for multipart/form-data content type (file uploads)
- Multi
Term Search restand non-WebAssembly - Combines multiple search terms across multiple fields
- NTile
databaseand non-WebAssembly - NTILE window function
- Namespace
Versioning restand non-WebAssembly - Namespace versioning (URL namespace-based)
- Now
databaseand non-WebAssembly - Now - current timestamp
- NthValue
databaseand non-WebAssembly - NTH_VALUE window function
- NullIf
databaseand non-WebAssembly - NullIf - return NULL if two expressions are equal
- Object
Builder openapiand non-WebAssembly - Builder for
Objectwith chainable configuration methods to create a newObject. - Object
Permission authand non-WebAssembly - Object permission with Permission trait support
- Object
Permission Manager authand non-WebAssembly - Object permission manager
- Open
ApiConfig openapiand non-WebAssembly - Configuration for OpenAPI endpoint mounting
- Open
ApiRouter openapi-routerand non-WebAssembly - Router wrapper that adds OpenAPI documentation endpoints
- Open
ApiSchema openapiand non-WebAssembly - Root object of the OpenAPI document.
- Operation
openapiand non-WebAssembly - Implements OpenAPI Operation Object object.
- Outer
Ref databaseand non-WebAssembly - OuterRef - reference to a field in the outer query (for subqueries)
- Page
Number Pagination restand non-WebAssembly - Page number based pagination
- Pages
Authenticator websockets-pagesand non-WebAssembly - Authenticator that integrates with reinhardt-pages’ Cookie/session authentication
- Paginated
Response restand non-WebAssembly - Paginated response wrapper
- Param
Context client-router - Context for parameter extraction.
- Parameter
openapiand non-WebAssembly - Implements OpenAPI Parameter Object for
Operation. - Path
( minimalorstandardordi) and non-WebAssembly - Extract a single value from the URL path
- Path
Item openapiand non-WebAssembly - Implements OpenAPI Path Item Object what describes
Operations available on a single path. - Path
Matcher Non-WebAssembly - Path matcher - uses composition to match paths
- Path
Param openapiand non-WebAssembly - Marker type for Path parameter metadata
- Path
Pattern Non-WebAssembly - Path pattern for URL matching Similar to Django’s URL patterns but using composition
- Phone
Number Validator coreand non-WebAssembly - Phone number validator for international phone numbers
- Pool
Config databaseand non-WebAssembly - Represents a pool config.
- Power
databaseand non-WebAssembly - Power - raise to a power
- Project
State databaseand non-WebAssembly - Project state for migration detection
- Query
( minimalorstandardordi) and non-WebAssembly - Extract query parameters from the URL
- Query
Param openapiand non-WebAssembly - Marker type for Query parameter metadata
- Query
Parameter Versioning restand non-WebAssembly - Query parameter versioning
- Query
Set databaseand non-WebAssembly - Represents a query set.
- Rank
databaseand non-WebAssembly - RANK window function
- Read
Only Model View Set Non-WebAssembly - ReadOnlyModelViewSet - only list and retrieve Demonstrates selective composition of mixins
- Redis
Cache cacheandredis-backendand non-WebAssembly - Redis cache backend with connection pooling
- RedocUI
openapiand non-WebAssembly - Redoc UI handler (alternative to Swagger UI)
- Renderer
Info restand non-WebAssembly - Renderer information for testing
- Request
coreand non-WebAssembly - HTTP Request representation
- Request
Body openapiand non-WebAssembly - Implements OpenAPI Request Body.
- Request
Context diand non-WebAssembly - Context for per-request dependency injection resolution.
- Request
Scope diand non-WebAssembly - Per-request dependency cache that stores resolved instances for the duration of a request.
- Response
coreand non-WebAssembly - HTTP Response representation
- Room
Manager websocketsand non-WebAssembly - Manages multiple WebSocket rooms
- Round
databaseand non-WebAssembly - Round - round to specified decimal places
- Route
Non-WebAssembly - Route definition Uses composition to combine path patterns with handlers Similar to Django’s URLPattern
- RowNumber
databaseand non-WebAssembly - ROW_NUMBER window function
- Savepoint
databaseand non-WebAssembly - Savepoint for nested transactions
- Scheduler
tasksand non-WebAssembly - Task scheduler for managing periodic tasks
- Schema
Builder Ext openapiand non-WebAssembly - Schema builder with serde attribute support
- Schema
Generator openapiand non-WebAssembly - Schema generator for OpenAPI schemas
- Schema
Registration openapiand non-WebAssembly - Compile-time schema registration metadata
- Schema
Registry openapiand non-WebAssembly - A registry for managing reusable OpenAPI schemas
- Scoped
Rate Throttle restand non-WebAssembly - Scope-based rate throttle with per-scope rate limits.
- Server
openapiand non-WebAssembly - Represents target server object. It can be used to alter server connection for path operations.
- Server
Router Non-WebAssembly - Unified router with hierarchical routing support
- Session
sessionsand non-WebAssembly - Django-style session object with dictionary-like interface
- Session
Middleware sessionsandmiddlewareand non-WebAssembly - Session middleware
- Session
Settings confand non-WebAssembly - Session settings
- Settings
Deprecated confand non-WebAssembly - Main settings structure for a Reinhardt project
- Settings
Builder confand non-WebAssembly - Settings builder for layered configuration
- Signal
coreand non-WebAssembly - A signal that can dispatch events to connected receivers
- Simple
Metadata restand non-WebAssembly - Simple metadata implementation
- Simple
User authand non-WebAssembly - Simple user implementation with basic fields
- Singleton
Scope diand non-WebAssembly - Application-wide dependency cache that persists across all requests.
- Soft
Delete databaseand non-WebAssembly - Soft delete field that can be composed into structs
- Sqrt
databaseand non-WebAssembly - Sqrt - square root
- Static
Settings confand non-WebAssembly - Static files settings
- Status
Code Non-WebAssembly - An HTTP status code (
status-codein RFC 9110 et al.). - Subquery
databaseand non-WebAssembly - Subquery - represents a subquery expression
- Substr
databaseand non-WebAssembly - Substr - extract a substring
- SwaggerUI
openapiand non-WebAssembly - Swagger UI handler
- Tag
openapiand non-WebAssembly - Implements OpenAPI Tag Object.
- Task
Queue tasksand non-WebAssembly - A task queue that delegates to a backend for task storage and retrieval.
- Template
Config confand non-WebAssembly - Template engine configuration
- Test
Response testand non-WebAssembly - Test response wrapper
- Timestamps
databaseand non-WebAssembly - Common timestamp fields that can be composed into structs
- Toml
File Source confand non-WebAssembly - TOML file configuration source
- Transaction
databaseand non-WebAssembly - Transaction manager
- Transaction
Scope databaseand non-WebAssembly - Transaction scope guard with automatic rollback on drop
- Trim
databaseand non-WebAssembly - Trim - remove leading and trailing whitespace
- URLPath
Versioning restand non-WebAssembly - URL path versioning
- Unified
Router client-router - Unified router combining server and client routing capabilities.
- Unique
Constraint databaseand non-WebAssembly - UNIQUE constraint (similar to Django’s UniqueConstraint)
- Update
User Data authand non-WebAssembly - User data for update
- Upper
databaseand non-WebAssembly - Upper - convert string to uppercase
- UrlPatterns
Registration Non-WebAssembly - URL patterns registration for compile-time discovery
- UrlReverser
Non-WebAssembly - URL reverser for resolving names back to URLs Similar to Django’s URLResolver reverse functionality
- UrlValidator
coreand non-WebAssembly - URL validator
- User
Manager authand non-WebAssembly - User manager
- User
Rate Throttle restand non-WebAssembly - Rate throttle for authenticated user requests.
- Validation
Errors coreand non-WebAssembly - Aggregates validation errors by field name.
- Versioning
Middleware restand non-WebAssembly - Middleware for automatic API version detection
- WebSocket
Route websocketsand non-WebAssembly - WebSocket route information
- WebSocket
Router websocketsand non-WebAssembly - WebSocket router for managing routes
- Window
databaseand non-WebAssembly - Window specification
Enums§
- Action
Type Non-WebAssembly - Action type for ViewSet operations
- Aggregate
Func databaseand non-WebAssembly - Aggregate function types
- Aggregate
Value databaseand non-WebAssembly - Result of an aggregation
- Annotation
Value databaseand non-WebAssembly - Represents an annotation value that can be added to a QuerySet
- AppError
coreand non-WebAssembly - Errors that can occur when working with the application registry
- Database
Backend databaseand non-WebAssembly - Defines possible database backend values.
- DiError
diand non-WebAssembly - Errors that can occur during dependency injection resolution.
- Enum
Tagging openapiand non-WebAssembly - Enum tagging strategy
- Error
coreand non-WebAssembly - The main error type for the Reinhardt framework.
- Extract
Component databaseand non-WebAssembly - Defines possible extract component values.
- Field
Error formsand non-WebAssembly - Error type returned when field validation fails.
- Field
Type restand non-WebAssembly - Field type enumeration for metadata
- Filter
Error restand non-WebAssembly - Errors that can occur during query filtering.
- Filter
Operator databaseand non-WebAssembly - Defines possible filter operator values.
- Filter
Value databaseand non-WebAssembly - Defines possible filter value values.
- Form
Error formsand non-WebAssembly - Error type returned when form-level validation fails.
- Frame
Boundary databaseand non-WebAssembly - Frame boundary
- Frame
Type databaseand non-WebAssembly - Window frame type
- Group
Management Error authand non-WebAssembly - Group management error
- Isolation
Level databaseand non-WebAssembly - Transaction isolation levels
- JwtError
auth-jwtand non-WebAssembly - JWT-specific errors with distinct variants for each failure mode.
- M2MAction
coreand non-WebAssembly - Actions that can occur on a many-to-many relationship.
- Message
websocketsand non-WebAssembly - WebSocket message types
- Migration
Error databaseand non-WebAssembly - Errors that can occur during migration operations.
- Navigation
Type client-router - The type of navigation that occurred.
- Negotiation
Error restand non-WebAssembly - Error type for negotiation failures
- Number
openapiand non-WebAssembly - Flexible number wrapper used by validation schema attributes to seamlessly support different number syntaxes.
- OnDelete
databaseand non-WebAssembly - Defines possible on delete values.
- OnUpdate
databaseand non-WebAssembly - Defines possible on update values.
- Order
databaseand non-WebAssembly - Ordering direction for ORDER BY clauses.
- Parameter
Location openapiand non-WebAssembly - In definition of
Parameter. - Pool
Error databaseand non-WebAssembly - Defines possible pool error values.
- Profile
confand non-WebAssembly - Application profile/environment
- Q
databaseand non-WebAssembly - Q object - represents a complex query condition Similar to Django’s Q() objects for building complex queries
- QOperator
databaseand non-WebAssembly - Q operator for combining query conditions
- Query
Builder Value databaseand non-WebAssembly - Core value representation for SQL parameters.
- Query
Value databaseand non-WebAssembly - Query value types
- RefOr
openapiand non-WebAssembly - A
Refor some other typeT. - Rename
All openapiand non-WebAssembly - Rename transformation strategy
- Required
openapiand non-WebAssembly - Value used to indicate whether parameter or property is required.
- Route
Error websocketsand non-WebAssembly - Routing errors
- Same
Site sessionsandmiddlewareand non-WebAssembly - SameSite cookie attribute
- Schema
openapiand non-WebAssembly - 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 openapiand non-WebAssembly - Errors that can occur during OpenAPI schema operations.
- Scope
diand non-WebAssembly - Defines the lifetime scope of a dependency.
- Session
Error sessionsand non-WebAssembly - Session backend errors
- Settings
Error confand non-WebAssembly - Settings error
- SqlType
databaseand non-WebAssembly - Defines possible sql type values.
- Trim
Type databaseand non-WebAssembly - Defines possible trim type values.
- User
Management Error authand non-WebAssembly - User management error
- Validator
Error coreand non-WebAssembly - Validation errors produced by validators.
- Versioning
Error restand non-WebAssembly - Errors that can occur during API version determination.
- WebSocket
Error websocketsand non-WebAssembly - Errors that can occur during WebSocket operations.
Statics§
- CONTENT_
TYPE_ REGISTRY databaseand non-WebAssembly - Global content type registry.
Traits§
- Apply
Update - Trait for applying partial updates from one struct to another.
- Auth
Backend authand non-WebAssembly - Authentication backend trait
- Base
Content Negotiation restand non-WebAssembly - Base content negotiator trait
- Base
Metadata restand non-WebAssembly - Base trait for metadata providers
- Base
User authand non-WebAssembly - BaseUser trait - Django-style authentication
- Base
Versioning restand non-WebAssembly - Base trait for API versioning strategies
- Cache
cacheand non-WebAssembly - Base cache trait
- Components
Ext openapiand non-WebAssembly - Extension trait for Components to provide convenient methods
- Constraint
databaseand non-WebAssembly - Base trait for all constraints
- Create
Mixin Non-WebAssembly - Create mixin - provides create() action
- Deserializer
restand non-WebAssembly - Deserializer trait for one-way deserialization
- Destroy
Mixin Non-WebAssembly - Destroy mixin - provides destroy() action
- Field
Ordering Ext restand non-WebAssembly - Extension trait to add ordering methods to Field
- Filter
Backend restand non-WebAssembly - 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 authand non-WebAssembly - FullUser trait - Django’s AbstractUser equivalent
- Generic
Relatable databaseand non-WebAssembly - Trait for models that can be targets of generic relations
- Handler
coreand non-WebAssembly - Handler trait for processing requests.
- HasCore
Settings confand non-WebAssembly - Trait for accessing
CoreSettingsfrom a composed settings type. - HasSettings
confand non-WebAssembly - Generic accessor trait for settings fragments.
- Injectable
diand non-WebAssembly - Injectable trait for dependencies.
- Into
Value databaseand non-WebAssembly - Trait for converting Rust types to SQL values.
- List
Mixin Non-WebAssembly - Mixin traits for ViewSet functionality These use composition instead of multiple inheritance List mixin - provides list() action
- Middleware
coreand non-WebAssembly - Middleware trait for request/response processing.
- Model
databaseand non-WebAssembly - Core trait for database models Uses composition instead of inheritance - models can implement multiple traits
- Model
Type databaseand non-WebAssembly - Trait for models that can be registered as content types
- Multiple
Object Mixin Non-WebAssembly - Trait for views that work with multiple objects
- Object
Permission Checker authand non-WebAssembly - Object permission checker trait
- Open
ApiSchema Ext openapiand non-WebAssembly - Extension trait for OpenApiSchema to provide convenient methods
- Operation
Ext openapiand non-WebAssembly - Extension trait for Operation to provide convenient methods
- Paginator
restand non-WebAssembly - Trait for pagination implementations
- Parameter
Ext openapiand non-WebAssembly - Extension trait for Parameter to provide convenient constructors
- Parameter
Metadata openapiand non-WebAssembly - Trait for types that can provide OpenAPI parameter metadata
- Parser
restand non-WebAssembly - Trait for request body parsers
- Password
Hasher authand non-WebAssembly - Password hasher trait
- Path
Item Ext openapiand non-WebAssembly - Extension trait for PathItem to provide constructor
- Permission
authand non-WebAssembly - Permission trait - defines permission checking interface
- Permissions
Mixin authand non-WebAssembly - PermissionsMixin trait - Django’s PermissionsMixin equivalent
- Request
Version Ext restand non-WebAssembly - Extension trait to get API version from request
- Responses
Ext openapiand non-WebAssembly - Extension trait for Responses to provide collection methods
- Retrieve
Mixin Non-WebAssembly - Retrieve mixin - provides retrieve() action
- Router
Non-WebAssembly - Router trait - composes routes together
- Schema
Ext openapiand non-WebAssembly - Extension trait for Schema to provide convenient constructor methods
- Serializer
restand non-WebAssembly - Core serializer trait for converting between input and output representations
- Session
Backend sessionsand non-WebAssembly - Session backend trait
- Settings
Fragment confand non-WebAssembly - 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 Non-WebAssembly - Trait for views that work with a single object
- Soft
Deletable databaseand non-WebAssembly - Trait for soft-deletable models Another composition trait instead of inheritance
- Storage
storageand non-WebAssembly - Trait for file storage backends
- Task
tasksand non-WebAssembly - Core trait that all tasks must implement, providing identity and metadata.
- Task
Executor tasksand non-WebAssembly - Trait for tasks that can be executed asynchronously.
- Throttle
restand non-WebAssembly - Core trait for rate-limiting strategies.
- Timestamped
databaseand non-WebAssembly - Trait for models with timestamps - compose this with Model This follows Rust’s composition pattern rather than Django’s inheritance
- ToSchema
openapiand non-WebAssembly - Trait for types that can generate OpenAPI schemas
- Transaction
Executor databaseand non-WebAssembly - Transaction executor trait for database-specific transaction handling
- Update
Mixin Non-WebAssembly - Update mixin - provides update() action
- UrlPattern
Non-WebAssembly - Trait for URL patterns that can be reversed at compile time
- UrlPattern
With Params Non-WebAssembly - Trait for URL patterns with parameters
- User
Deprecated authand non-WebAssembly - User trait - Core authentication trait
- Validate
coreand non-WebAssembly - Trait for struct-level validation.
- Validator
coreand non-WebAssembly - Trait for validators
- View
Non-WebAssembly - Base trait for all generic views
- ViewSet
Non-WebAssembly - ViewSet trait - similar to Django REST Framework’s ViewSet Uses composition of mixins instead of inheritance
- WebSocket
Consumer websocketsand non-WebAssembly - WebSocket consumer trait
- Window
Function databaseand non-WebAssembly - Base trait for window functions
Functions§
- atomic
databaseand non-WebAssembly - Execute a function within a transaction scope
- atomic_
with_ isolation databaseand non-WebAssembly - Execute a function within a transaction with specific isolation level
- clear_
router Non-WebAssembly - Clear the registered router (useful for tests)
- clear_
websocket_ router websocketsand non-WebAssembly - Clear the global WebSocket router
- generate_
openapi_ schema openapiand non-WebAssembly - Generate OpenAPI schema from global registry
- get_
list_ or_ 404 shortcutsanddatabaseand non-WebAssembly - Get a list of objects from the database or return a 404 response if empty
- get_
object_ or_ 404 shortcutsanddatabaseand non-WebAssembly - Get a single object from the database or return a 404 response
- get_
router Non-WebAssembly - Get a reference to the globally registered router
- get_
websocket_ router websocketsand non-WebAssembly - Get the global WebSocket router
- include
Non-WebAssembly - Create an IncludedRouter from a list of routes Similar to Django’s include() function
- is_
router_ registered Non-WebAssembly - Check if a router has been registered
- m2m_
changed coreand non-WebAssembly - Returns the M2M changed signal for the given model types.
- path
Non-WebAssembly - Create a route using simple path syntax Similar to Django’s path() function
- post_
delete coreand non-WebAssembly - Post-delete signal - sent after a model instance is deleted
- post_
save coreand non-WebAssembly - Post-save signal - sent after a model instance is saved
- pre_
delete coreand non-WebAssembly - Pre-delete signal - sent before a model instance is deleted
- pre_
save coreand non-WebAssembly - Pre-save signal - sent before a model instance is saved
- re_path
Non-WebAssembly - Create a route using regex syntax Similar to Django’s re_path() function
- redirect
shortcutsand non-WebAssembly - Create a validated temporary redirect (HTTP 302) to the specified URL.
- register_
router Non-WebAssembly - Register the application’s main router globally
- register_
router_ arc Non-WebAssembly - Register a router that is already wrapped in Arc
- register_
websocket_ router websocketsand non-WebAssembly - Register a global WebSocket router
- render_
html shortcutsand non-WebAssembly - Render a simple HTML string and return an HTTP 200 response
- render_
json shortcutsand non-WebAssembly - Render data as JSON and return an HTTP 200 response, or an error if serialization fails
- render_
text shortcutsand non-WebAssembly - Render a simple text string and return an HTTP 200 response
- reverse
Non-WebAssembly - Standalone reverse function for convenience Similar to Django’s reverse() function
- reverse_
websocket_ url websocketsand non-WebAssembly - URL reverse lookup for WebSocket routes
- validate_
auth_ extractors authand non-WebAssembly - Validates that the DI context is properly configured for auth extractors.
Type Aliases§
- AppResult
coreand non-WebAssembly - A specialized
Resulttype for application operations. - Context
Non-WebAssembly - Context data for template rendering
- DiResult
diand non-WebAssembly - A specialized
Resulttype for dependency injection operations. - Filter
Result restand non-WebAssembly - A convenience type alias for filter operation results.
- Form
Result formsand non-WebAssembly - Result type alias for form-level operations.
- Group
Management Result authand non-WebAssembly - Group management result
- Optional
Injected diand non-WebAssembly - Optional injected dependency
- Parse
Error restand non-WebAssembly - Type alias for parser errors, using the framework’s
Errortype. - Parse
Result restand non-WebAssembly - Type alias for parser results, using the framework’s
Resulttype. - Result
coreand non-WebAssembly - A convenient
Resulttype alias usingreinhardt_core::exception::Erroras the error type. - Route
Result websocketsand non-WebAssembly - Routing result type
- Schema
Object openapiand non-WebAssembly - A complete schema object with metadata This is an alias to utoipa’s Schema for convenience
- Schema
Result openapiand non-WebAssembly - Result type for OpenAPI schema operations.
- User
Management Result authand non-WebAssembly - User management result
- Validation
Result coreand non-WebAssembly - Result type for validation operations.
- View
Result coreand non-WebAssembly - A convenient type alias for view/endpoint function return types.
- WebSocket
Result websocketsand non-WebAssembly - A specialized
Resulttype for WebSocket operations.
Attribute Macros§
- admin
adminand non-WebAssembly - Attribute macro for ModelAdmin configuration
- api_
view Non-WebAssembly - Decorator for function-based API views
- app_
config coreand non-WebAssembly - Attribute macro for Django-style AppConfig definition with automatic derive
- apply_
update Non-WebAssembly - Attribute macro for applying partial updates to target structs
- delete
Non-WebAssembly - DELETE method decorator
- get
Non-WebAssembly - GET method decorator
- model
databaseand non-WebAssembly - Attribute macro for Django-style model definition with automatic derive
- patch
Non-WebAssembly - PATCH method decorator
- post
Non-WebAssembly - POST method decorator
- put
Non-WebAssembly - PUT method decorator
- routes
Non-WebAssembly - Register URL patterns for automatic discovery by the framework
- settings
confand non-WebAssembly - Settings attribute macro for composable configuration.
Derive Macros§
- AppConfig
coreand non-WebAssembly - Derive macro for automatic AppConfig factory method generation
- Derive
Apply Update Non-WebAssembly - Derive macro for automatic
ApplyUpdatetrait implementation - Model
databaseand non-WebAssembly - Derive macro for automatic Model implementation and migration registration
- Schema
openapiand non-WebAssembly - Derive macro for automatic OpenAPI schema generation.
- Validate
coreand non-WebAssembly - Derive macro for struct-level validation