base_http_content/lib.rs
1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4//! Read request bodies into structures declared with `base-web-content`, doing the I/O it leaves to the server: reading the body as it arrives, refusing a `Content-Length` larger than the declaration could accept before reading it, streaming uploads to storage, and saving uploads to files safely.
5#![doc = include_str!("../readme.md")]
6#![forbid(unsafe_code)]
7
8// The test support module names this crate, as the integration tests do.
9#[cfg(test)]
10extern crate self as base_http_content;
11
12mod file_store;
13mod read_content;
14mod read_error;
15mod upload_store;
16
17pub use file_store::{FileStore, FileUpload};
18pub use read_content::{ReadOptions, read_content, read_content_with};
19pub use read_error::{ReadError, ReadErrorKind};
20pub use upload_store::{NoUploads, NoUploadsError, UploadStore};
21
22#[cfg(test)]
23mod tests;