Skip to main content

hyperlane_plugin_multipart/
lib.rs

1//! hyperlane-plugin-multipart
2//!
3//! Bounded RFC 7578 `multipart/form-data` upload parser and guard for Hyperlane
4//! with file/field size limits, traversal-proof filename sanitization,
5//! magic-byte MIME sniffing, and prebuilt rejection wire responses.
6
7mod r#const;
8mod r#enum;
9mod r#fn;
10mod r#impl;
11mod r#static;
12mod r#struct;
13
14#[cfg(test)]
15#[path = "../tests/mod.rs"]
16mod tests;
17
18pub use {r#const::*, r#enum::*, r#fn::*, r#struct::*};
19
20pub(crate) use r#static::*;
21
22use std::{
23    collections::VecDeque,
24    error::Error,
25    fmt::{self, Display, Formatter},
26    str::from_utf8,
27    sync::OnceLock,
28};
29
30use {
31    hyperlane::{
32        CONTENT_TYPE, Context, HttpStatus, Request, Response, ResponseError, ServerHook, Status,
33        Stream,
34    },
35    lombok_macros::*,
36};