1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Framework-agnostic response envelope + error taxonomy for SNAP BI.
//!
//! This crate is the response half of the SNAP BI spine (the crypto half lives
//! in `kamu-snap-crypto`). It exposes:
//!
//! - [`SnapResponse<T>`] — typed envelope + optional typed payload with
//! spec-compliant flat JSON wire shape.
//! - [`SnapEnvelope`] — the envelope fields (`responseCode` +
//! `responseMessage`).
//! - [`Error`] — the 61-variant SNAP BI error taxonomy plus a feature-gated
//! `Crypto` bridge (feature `crypto`).
//! - [`Category`] — coarse retry/policy classification.
//! - [`ResponseCode`] — wire newtype with defensive parsing + an inverse
//! classifier that maps received codes back to [`Error`] variants.
//! - [`ServiceCode`] — validated 0..=99 newtype.
//!
//! # Framework support
//!
//! This crate is framework-free. The `Responder` (actix-web) and
//! `IntoResponse` (axum) impls live in the per-framework adapter crates
//! (`kamu-snap-response-actix`, `kamu-snap-response-axum`).
//!
//! # Feature flags
//!
//! - `crypto` (default off) — enables the `Error::Crypto` variant which wraps a
//! `kamu_snap_crypto::Error` for server-side handlers that propagate crypto
//! failures into the SNAP error taxonomy.
pub use Category;
pub use ;
pub use Error;
pub use ;