1#![deny(unsafe_code)]
33#![allow(clippy::uninlined_format_args)]
35#![allow(clippy::single_char_pattern)]
36#![allow(clippy::must_use_candidate)]
37#![allow(clippy::needless_pass_by_value)]
38#![allow(clippy::match_wildcard_for_single_variants)]
39#![allow(clippy::redundant_closure)]
40#![allow(clippy::single_match_else)]
41#![allow(clippy::struct_field_names)]
42#![allow(clippy::manual_strip)]
43#![allow(clippy::items_after_statements)]
44#![allow(clippy::trivially_copy_pass_by_ref)]
45#![allow(clippy::match_same_arms)]
46#![allow(clippy::needless_borrow)]
47#![allow(clippy::match_wild_err_arm)]
48#![allow(clippy::format_push_string)]
49#![allow(clippy::match_wildcard_for_single_variants)]
50#![allow(clippy::manual_contains)]
51#![allow(clippy::needless_borrows_for_generic_args)]
52#![allow(clippy::iter_without_into_iter)]
53#![allow(clippy::single_match)]
54#![allow(clippy::len_zero)]
55#![allow(clippy::len_without_is_empty)]
56#![allow(clippy::field_reassign_with_default)]
57#![allow(clippy::cast_possible_truncation)]
58#![allow(clippy::derivable_impls)]
59#![allow(clippy::manual_let_else)]
60#![allow(clippy::needless_borrows_for_generic_args)]
61#![allow(clippy::too_many_lines)]
62#![allow(clippy::trivially_copy_pass_by_ref)]
63#![allow(clippy::unused_async)]
64#![allow(clippy::used_underscore_binding)]
65#![allow(clippy::duplicated_attributes)]
66
67pub mod body;
68pub mod connection;
69pub mod expect;
70pub mod multipart;
71mod parser;
72mod query;
73pub mod range;
74mod response;
75mod server;
76pub mod streaming;
77
78pub use body::{
79 AsyncChunkedStream, AsyncContentLengthStream, BodyConfig, BodyError, ChunkedReader,
80 ContentLengthReader, DEFAULT_MAX_BODY_SIZE, DEFAULT_STREAMING_THRESHOLD, StreamingBodyConfig,
81 create_chunked_stream, create_content_length_stream, parse_body, parse_body_with_consumed,
82 validate_content_length,
83};
84pub use connection::{
85 ConnectionInfo, STANDARD_HOP_BY_HOP_HEADERS, is_standard_hop_by_hop_header,
86 parse_connection_header, should_keep_alive, strip_hop_by_hop_headers,
87};
88pub use expect::{
89 CONTINUE_RESPONSE, EXPECT_100_CONTINUE, ExpectHandler, ExpectResult, FnValidator,
90 PreBodyValidator, PreBodyValidators,
91};
92pub use parser::{
93 BodyLength, Header, HeadersIter, HeadersParser, ParseError, ParseLimits, ParseStatus, Parser,
94 RequestLine, StatefulParser,
95};
96pub use query::{QueryString, percent_decode};
97pub use range::{
98 ByteRange, IfRangeResult, RangeError, RangeSpec, accept_ranges_bytes, check_if_range,
99 content_range_unsatisfiable, parse_range_header, parse_range_spec, supports_ranges,
100};
101pub use response::{ChunkedEncoder, ResponseWrite, ResponseWriter, Trailers};
102pub use server::{
103 AppServeExt, DEFAULT_DRAIN_TIMEOUT_SECS, DEFAULT_KEEP_ALIVE_TIMEOUT_SECS,
104 DEFAULT_MAX_CONNECTIONS, DEFAULT_MAX_REQUESTS_PER_CONNECTION, DEFAULT_READ_BUFFER_SIZE,
105 DEFAULT_REQUEST_TIMEOUT_SECS, ServeError, Server, ServerConfig, ServerError, ServerMetrics,
106 TcpServer, serve, serve_with_config,
107};
108
109pub use asupersync::signal::{GracefulOutcome, ShutdownController, ShutdownReceiver};
111pub use multipart::{
112 DEFAULT_MAX_FIELDS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_TOTAL_SIZE, MultipartConfig,
113 MultipartError, MultipartForm, MultipartParser, Part, UploadFile, parse_boundary,
114};
115pub use streaming::{
116 CancelAwareStream, ChunkedBytes, DEFAULT_CHUNK_SIZE, DEFAULT_MAX_BUFFER_SIZE, FileStream,
117 StreamConfig, StreamError, StreamingResponseExt,
118};