#response #axum #derive

macro into-response

IntoResponse derive for Axum framework

2 unstable releases

0.2.1 Dec 20, 2024
0.2.0 Dec 20, 2024
0.1.0 Dec 20, 2024

#105 in #response

Download history 263/week @ 2024-12-16 18/week @ 2024-12-23

281 downloads per month

MIT license

4KB

IntoResponse

IntoResponse is a Rust crate that provides utilities for deriving and implementing the IntoResponse trait for custom types. This crate simplifies the process of converting custom types into HTTP responses.

Features

  • Derive macro for IntoResponse trait
  • Customizable response handling
  • Support for common response types

Usage

Add into_response to your Cargo.toml:

[dependencies]
into_response = "0.2"

Example

use into_response::IntoResponse;

#[derive(IntoResponse)]
struct MyResponse {
  message: String,
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Acknowledgements

Special thanks to the Rust community for their contributions and support.

Dependencies

~0.3–1MB
~21K SLoC