| Crates.io | rocket-no-content |
| lib.rs | rocket-no-content |
| version | 0.1.4 |
| created_at | 2024-09-22 10:32:36.869565+00 |
| updated_at | 2024-09-29 15:47:30.738886+00 |
| description | Provides a 204 No Content responder for Rocket. Includes optional schema definition. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1382848 |
| size | 4,985 |
rocket-no-content provides a singular struct EmptyResponse which has a Responder implementation that returns "204 No Content". In addition to this, it also implements a schema for okapi.
I got tired of copying the same struct and implementation between projects, so here it is.
use rocket-no-content::EmptyResponse;
#[openapi(tag = "Tagged")]
#[get("/test")]
pub async fn test() -> EmptyResponse {
EmptyResponse
// Responds with "204 No Content"
}