actix_web_lab/
lib.rs

1//! In-progress extractors and middleware for Actix Web.
2//!
3//! # What Is This Crate?
4//! This crate serves as a preview and test ground for upcoming features and ideas for Actix Web's
5//! built in library of extractors, middleware and other utilities.
6//!
7//! Any kind of feedback is welcome.
8//!
9//! # Complete Examples
10//! See [the `examples` folder][examples] for some complete examples of items in this crate.
11//!
12//! # Things To Know About This Crate
13//! - It will never reach v1.0.
14//! - Minimum Supported Rust Version (MSRV) is latest stable at the time of each release.
15//! - Breaking changes will likely happen on most 0.x version bumps.
16//! - Documentation might be limited for some items.
17//! - Items that graduate to Actix Web crate will be marked deprecated here for a reasonable amount
18//!   of time so you can migrate.
19//! - Migrating will often be as easy as dropping the `_lab` suffix from imports when migrating.
20//!
21//! [examples]: https://github.com/robjtede/actix-web-lab/tree/HEAD/actix-web-lab/examples
22
23#![deny(rust_2018_idioms, nonstandard_style)]
24#![warn(future_incompatible, missing_docs)]
25#![cfg_attr(docsrs, feature(doc_auto_cfg))]
26
27mod acceptable;
28mod body_async_write;
29mod body_channel;
30mod body_limit;
31mod bytes;
32mod cache_control;
33mod catch_panic;
34#[cfg(feature = "cbor")]
35mod cbor;
36mod content_length;
37mod csv;
38mod display_stream;
39mod err_handler;
40mod forwarded;
41mod host;
42mod html;
43mod infallible_body_stream;
44mod json;
45mod lazy_data;
46mod load_shed;
47mod local_data;
48mod middleware_from_fn;
49mod middleware_map_response;
50mod middleware_map_response_body;
51#[cfg(feature = "msgpack")]
52mod msgpack;
53mod ndjson;
54mod normalize_path;
55mod panic_reporter;
56mod path;
57mod query;
58mod redirect;
59mod redirect_to_https;
60mod redirect_to_www;
61mod request_signature;
62#[cfg(feature = "spa")]
63mod spa;
64mod strict_transport_security;
65mod swap_data;
66#[cfg(test)]
67mod test_header_macros;
68mod test_request_macros;
69mod test_response_macros;
70mod test_services;
71mod url_encoded_form;
72mod x_forwarded_prefix;
73
74// public API
75pub mod body;
76pub mod extract;
77pub mod guard;
78pub mod header;
79pub mod middleware;
80pub mod respond;
81pub mod sse;
82pub mod test;
83pub mod util;
84pub mod web;
85
86#[cfg(feature = "derive")]
87pub use actix_web_lab_derive::FromRequest;
88
89// private re-exports for macros
90#[doc(hidden)]
91pub mod __reexports {
92    pub use ::actix_web;
93    pub use ::futures_util;
94    pub use ::serde_json;
95    pub use ::tokio;
96    pub use ::tracing;
97}
98
99pub(crate) type BoxError = Box<dyn std::error::Error>;