actix-web-lab
Experimental extractors, middleware, and other extras for possible inclusion in Actix Web.
Features
Responders
Csv
: efficient CSV streaming (docs)NdJson
: efficient NDJSON streaming (docs)DisplayStream
: efficient line-by-lineDisplay
streaming (docs)Html
: basic string wrapper that responds with HTML Content-Type (docs)
Middleware
from_fn
: use an async function as a middleware (docs)redirect_to_https
: function middleware to redirect traffic to HTTPS if connection is insecure (docs)redirect_to_www
: function middleware to redirect traffic towww.
if not already there (docs)ErrorHandlers
: alternative error handler middleware with simpler interface (docs)
Extractors
LazyData
: app data/state initialized on first use (docs)Json
: simplified JSON extractor with const-generic limits (docs)Query
: simplified query-string extractor (docs)BodyHash
: wraps an extractor and calculates a body checksum hash alongside (docs)BodyHmac
: wraps an extractor and calculates a body HMAC alongside (docs)
Body Types
channel
: a simple channel-like body type with a sender side that can be used from another thread (docs)
Services
Route Guards
Acceptable
: verifies that anAccept
header is present and it contains a compatible MIME type (docs)
Things To Know About This Crate
- It will never reach v1.0.
- Minimum Supported Rust Version (MSRV) is latest stable at the time of each release.
- Breaking changes will likely happen on most 0.x version bumps.
- Documentation might be limited for some items.
- Items that graduate to Actix Web crate will be marked deprecated here for a reasonable amount of time so you can migrate.
- Migrating will often be as easy as dropping the
_lab
suffix from imports when migrating.