Skip to main content

hyperlane_plugin_problem_details/
lib.rs

1//! hyperlane-plugin-problem-details
2//!
3//! RFC 9457 (`application/problem+json`) error response builder and automatic
4//! `4xx`/`5xx` normalizer for Hyperlane with a zero-overhead `2xx`/`3xx`
5//! fast path.
6
7mod r#const;
8mod r#fn;
9mod r#impl;
10mod r#static;
11mod r#struct;
12
13#[cfg(test)]
14#[path = "../tests/mod.rs"]
15mod tests;
16
17pub use {r#const::*, r#fn::*, r#struct::*};
18
19pub(crate) use r#static::*;
20
21use std::{
22    collections::{BTreeMap, VecDeque},
23    str::from_utf8,
24    sync::OnceLock,
25};
26
27use {
28    hyperlane::{CONTENT_TYPE, Context, HttpStatus, Response, ServerHook, Status, Stream},
29    lombok_macros::*,
30    serde::{Deserialize, Serialize},
31    serde_json::{Value, to_vec},
32};