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 http2;
71pub mod multipart;
72mod parser;
73mod query;
74pub mod range;
75mod response;
76mod server;
77pub mod streaming;
78pub mod websocket;
79
80pub use body::{
81 AsyncChunkedStream, AsyncContentLengthStream, BodyConfig, BodyError, ChunkedReader,
82 ContentLengthReader, DEFAULT_MAX_BODY_SIZE, DEFAULT_STREAMING_THRESHOLD, StreamingBodyConfig,
83 create_chunked_stream, create_content_length_stream, parse_body, parse_body_with_consumed,
84 validate_content_length,
85};
86pub use connection::{
87 ConnectionInfo, STANDARD_HOP_BY_HOP_HEADERS, is_standard_hop_by_hop_header,
88 parse_connection_header, should_keep_alive, strip_hop_by_hop_headers,
89};
90pub use expect::{
91 CONTINUE_RESPONSE, EXPECT_100_CONTINUE, ExpectHandler, ExpectResult, FnValidator,
92 PreBodyValidator, PreBodyValidators,
93};
94pub use parser::{
95 BodyLength, Header, HeadersIter, HeadersParser, ParseError, ParseLimits, ParseStatus, Parser,
96 RequestLine, StatefulParser,
97};
98pub use query::{QueryString, percent_decode};
99pub use range::{
100 ByteRange, IfRangeResult, RangeError, RangeSpec, accept_ranges_bytes, check_if_range,
101 content_range_unsatisfiable, parse_range_header, parse_range_spec, supports_ranges,
102};
103pub use response::{ChunkedEncoder, ResponseWrite, ResponseWriter, Trailers};
104pub use server::{
105 AppServeExt, DEFAULT_DRAIN_TIMEOUT_SECS, DEFAULT_KEEP_ALIVE_TIMEOUT_SECS,
106 DEFAULT_MAX_CONNECTIONS, DEFAULT_MAX_REQUESTS_PER_CONNECTION, DEFAULT_READ_BUFFER_SIZE,
107 DEFAULT_REQUEST_TIMEOUT_SECS, ServeError, Server, ServerConfig, ServerError, ServerMetrics,
108 TcpServer, serve, serve_with_config,
109};
110
111pub use asupersync::signal::{GracefulOutcome, ShutdownController, ShutdownReceiver};
113pub use multipart::{
114 DEFAULT_MAX_FIELDS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_TOTAL_SIZE, MultipartConfig,
115 MultipartError, MultipartForm, MultipartParser, Part, UploadFile, parse_boundary,
116};
117pub use streaming::{
118 CancelAwareStream, ChunkedBytes, DEFAULT_CHUNK_SIZE, DEFAULT_MAX_BUFFER_SIZE, FileStream,
119 StreamConfig, StreamError, StreamingResponseExt,
120};
121pub use websocket::{
122 CloseCode, DEFAULT_MAX_FRAME_SIZE, DEFAULT_MAX_MESSAGE_SIZE, Message, Opcode, WebSocket,
123 WebSocketConfig, WebSocketError, accept_key, build_accept_response, validate_upgrade_request,
124};