Skip to main content

hyperlane_plugin_etag/
lib.rs

1//! hyperlane-plugin-etag
2//!
3//! Opt-in automatic ETag and HTTP conditional request middleware for Hyperlane
4//! supporting strong and weak `XxHash3_64` tags, zero-allocation `If-None-Match`
5//! (`304 Not Modified`), and `If-Match` (`412 Precondition Failed`) optimistic
6//! concurrency checks.
7
8mod r#const;
9mod r#enum;
10mod r#fn;
11mod r#impl;
12mod r#static;
13mod r#struct;
14mod r#trait;
15
16#[cfg(test)]
17#[path = "../tests/mod.rs"]
18mod tests;
19
20pub use {r#const::*, r#enum::*, r#fn::*, r#struct::*, r#trait::*};
21
22pub(crate) use r#static::*;
23
24use std::{
25    collections::VecDeque,
26    hash::Hasher,
27    str::from_utf8,
28    sync::{Arc, OnceLock},
29};
30
31use {
32    hyperlane::{
33        CONTENT_TYPE, Context, ETAG, HttpStatus, IF_MATCH, Method, Request, Response,
34        ResponseError, ServerHook, Status, Stream, XxHash3_64,
35    },
36    lombok_macros::*,
37};