html_node_core/http.rs
1#[cfg(feature = "axum")]
2mod axum {
3 use axum::response::{Html, IntoResponse, Response};
4
5 #[cfg(feature = "pretty")]
6 use crate::pretty::Pretty;
7 use crate::Node;
8
9 impl IntoResponse for Node {
10 fn into_response(self) -> Response {
11 Html(self.to_string()).into_response()
12 }
13 }
14
15 #[cfg(feature = "pretty")]
16 impl IntoResponse for Pretty {
17 fn into_response(self) -> Response {
18 Html(self.to_string()).into_response()
19 }
20 }
21}