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#![cfg_attr(docsrs, feature(doc_auto_cfg))]
24
25mod body_async_write;
26mod body_channel;
27mod body_limit;
28mod bytes;
29mod cache_control;
30mod catch_panic;
31#[cfg(feature = "cbor")]
32mod cbor;
33mod clear_site_data;
34mod condition_option;
35mod content_length;
36mod csv;
37mod display_stream;
38mod err_handler;
39mod forwarded;
40mod host;
41mod infallible_body_stream;
42mod json;
43mod lazy_data;
44mod lazy_data_shared;
45mod load_shed;
46mod local_data;
47mod middleware_map_response;
48mod middleware_map_response_body;
49#[cfg(feature = "msgpack")]
50mod msgpack;
51mod ndjson;
52mod normalize_path;
53mod panic_reporter;
54mod path;
55mod query;
56mod redirect_to_https;
57mod redirect_to_non_www;
58mod redirect_to_www;
59mod request_signature;
60#[cfg(feature = "spa")]
61mod spa;
62mod strict_transport_security;
63mod swap_data;
64#[cfg(test)]
65mod test_header_macros;
66mod test_request_macros;
67mod test_response_macros;
68mod test_services;
69mod url_encoded_form;
70mod x_forwarded_prefix;
71
72// public API
73pub mod body;
74pub mod extract;
75pub mod guard;
76pub mod header;
77pub mod middleware;
78pub mod respond;
79pub mod sse;
80pub mod test;
81pub mod util;
82pub mod web;
83
84#[cfg(feature = "derive")]
85pub use actix_web_lab_derive::FromRequest;
86
87// private re-exports for macros
88#[doc(hidden)]
89pub mod __reexports {
90    pub use ::actix_web;
91    pub use ::futures_util;
92    pub use ::serde_json;
93    pub use ::tokio;
94    pub use ::tracing;
95}
96
97pub(crate) type BoxError = Box<dyn std::error::Error>;