Core types and traits for fastapi_rust.
This crate provides the fundamental building blocks:
- [
Request] and [Response] types - [
RequestContext] wrapping asupersync'sCx - [
FromRequest] trait for extractors - Error types and [
IntoResponse] trait
Design Principles
- Zero-copy where possible
- No runtime reflection
- All types support
Send + Sync - Cancel-correct via asupersync integration
Asupersync Integration
This crate uses asupersync as its async runtime foundation, providing:
- Structured concurrency: Request handlers run in regions
- Cancel-correctness: Graceful cancellation via checkpoints
- Budgeted timeouts: Request timeouts via budget exhaustion
- Deterministic testing: Lab runtime for reproducible tests