//! HttpResponse — automatic Sealed field unwrapping for HTTP responses.
//!
//! Structs deriving `HttpResponse` are automatically serialized to JSON,
//! with `Sealed<T>` fields unwrapped via `sealed_to_json_value()` within
//! the mad-hatter crate boundary. Engine code never directly touches
//! the raw sealed values.
//!
//! The derive macro generates both `HttpResponse` and `IntoResponse` impls,
//! so derived types can be used directly as axum handler return values.

use axum::response::Response;

/// Trait for types that can be converted to HTTP responses.
///
/// Typically derived via `#[derive(HttpResponse)]`. The derive macro
/// generates JSON serialization code that automatically unwraps
/// `Sealed<T>` fields using `sealed_to_json_value()`.
///
/// The derive macro also generates an `axum::response::IntoResponse` impl
/// that delegates to `into_http_response()`.
pub trait HttpResponse {
    fn into_http_response(self) -> Response;
}