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
40
41
42
43
44
45
46
47
48
49
50
51
//! Actix-web bridge for [`serenade_http`].
//!
//! Convert Actix requests into Serenade [`Request`](serenade_http::Request) values,
//! run a kernel ([`HttpKernel`](serenade_http::HttpKernel) sync or
//! [`AsyncHttpKernel`](serenade_http::AsyncHttpKernel)), then map the Serenade
//! response back to Actix. Other listen adapters can reuse the same
//! request/response mapping without changing the foundation crate.
//!
//! Typical sync handler:
//!
//! ```ignore
//! async fn healthz(
//! request: HttpRequest,
//! body: web::Bytes,
//! kernel: web::Data<HttpKernel>,
//! ) -> HttpResponse {
//! dispatch(kernel.get_ref(), &request, body)
//! }
//! ```
//!
//! App skeletons that only need “bind and serve the kernel” can call
//! [`listen`] with an [`AsyncHttpKernel`](serenade_http::AsyncHttpKernel)
//! (use [`from_sync`](serenade_http::AsyncHttpKernel::from_sync) for sync
//! controllers) instead of wiring `HttpServer` by hand.
//!
//! # Examples
//!
//! ```
//! use serenade_http::Response;
//! use serenade_http_actix::to_actix;
//!
//! let response = to_actix(&Response::text(200, "ok"));
//! assert_eq!(response.status(), 200);
//! ```
pub use ;
pub use ;
pub use ;
/// Compile-time crate version for diagnostics.
pub const