1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#[cfg(feature = "axum")]
mod axum {
    use axum::response::{Html, IntoResponse, Response};

    #[cfg(feature = "pretty")]
    use crate::pretty::Pretty;
    use crate::Node;

    impl IntoResponse for Node {
        fn into_response(self) -> Response {
            Html(self.to_string()).into_response()
        }
    }

    #[cfg(feature = "pretty")]
    impl IntoResponse for Pretty {
        fn into_response(self) -> Response {
            Html(self.to_string()).into_response()
        }
    }
}