1#![warn(
31 clippy::all,
32 clippy::dbg_macro,
33 clippy::todo,
34 clippy::empty_enum,
35 clippy::enum_glob_use,
36 clippy::mem_forget,
37 clippy::unused_self,
38 clippy::filter_map_next,
39 clippy::needless_continue,
40 clippy::needless_borrow,
41 clippy::match_wildcard_for_single_variants,
42 clippy::if_let_mutex,
43 clippy::await_holding_lock,
44 clippy::match_on_vec_items,
45 clippy::imprecise_flops,
46 clippy::suboptimal_flops,
47 clippy::lossy_float_literal,
48 clippy::rest_pat_in_fully_bound_structs,
49 clippy::fn_params_excessive_bools,
50 clippy::exit,
51 clippy::inefficient_to_string,
52 clippy::linkedlist,
53 clippy::macro_use_imports,
54 clippy::option_option,
55 clippy::verbose_file_reads,
56 clippy::unnested_or_patterns,
57 clippy::str_to_string,
58 rust_2018_idioms,
59 future_incompatible,
60 nonstandard_style,
61 missing_debug_implementations,
62 missing_docs
63)]
64#![deny(unreachable_pub)]
65#![allow(elided_lifetimes_in_paths, clippy::type_complexity)]
66#![forbid(unsafe_code)]
67#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
68#![cfg_attr(test, allow(clippy::float_cmp))]
69#![cfg_attr(not(test), warn(clippy::print_stdout, clippy::dbg_macro))]
70
71#[allow(unused_extern_crates)]
72extern crate self as axum_extra;
73
74pub mod body;
75pub mod either;
76pub mod extract;
77pub mod handler;
78pub mod middleware;
79pub mod response;
80pub mod routing;
81
82#[cfg(feature = "json-lines")]
83pub mod json_lines;
84
85#[cfg(feature = "typed-header")]
86pub mod typed_header;
87
88#[cfg(feature = "typed-header")]
89#[doc(no_inline)]
90pub use headers;
91
92#[cfg(feature = "typed-header")]
93#[doc(inline)]
94pub use typed_header::TypedHeader;
95
96#[cfg(feature = "protobuf")]
97pub mod protobuf;
98
99#[cfg(feature = "typed-routing")]
101#[doc(hidden)]
102pub mod __private {
103 use percent_encoding::{AsciiSet, CONTROLS};
104
105 pub use percent_encoding::utf8_percent_encode;
106
107 const FRAGMENT: &AsciiSet = &CONTROLS.add(b' ').add(b'"').add(b'<').add(b'>').add(b'`');
109 const PATH: &AsciiSet = &FRAGMENT.add(b'#').add(b'?').add(b'{').add(b'}');
110 pub const PATH_SEGMENT: &AsciiSet = &PATH.add(b'/').add(b'%');
111}
112
113#[cfg(test)]
114use axum_macros::__private_axum_test as test;
115
116#[cfg(test)]
117#[allow(unused_imports)]
118pub(crate) mod test_helpers {
119 use axum::{extract::Request, response::Response, serve};
120
121 mod test_client {
122 #![allow(dead_code)]
123 include!(concat!(
124 env!("CARGO_MANIFEST_DIR"),
125 "/../axum/src/test_helpers/test_client.rs"
126 ));
127 }
128 pub(crate) use self::test_client::*;
129}