Skip to main content

hyperlane_plugin_body_limit/
lib.rs

1//! hyperlane-plugin-body-limit
2//!
3//! Zero-allocation granular request payload size enforcement for Hyperlane
4//! supporting global limits, per-prefix overrides, per-MIME caps, and
5//! prebuilt `413 Payload Too Large` 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#struct::*};
19
20pub(crate) use {r#fn::*, r#static::*};
21
22use std::{cmp::Reverse, collections::VecDeque, sync::OnceLock};
23
24use {
25    hyperlane::{
26        CONTENT_LENGTH, CONTENT_TYPE, Context, HttpStatus, Request, Response, ResponseError,
27        ServerHook, Status, Stream,
28    },
29    lombok_macros::*,
30};