Crates.io | tayvo_rocket_empty |
lib.rs | tayvo_rocket_empty |
version | 0.1.2 |
created_at | 2025-09-02 17:36:19.429202+00 |
updated_at | 2025-09-02 17:36:19.429202+00 |
description | Provides a 204 No Content responder for Rocket. Includes optional schema definition. |
homepage | |
repository | |
max_upload_size | |
id | 1821454 |
size | 51,270 |
rocket_empty
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_empty::EmptyResponse;
#[openapi(tag = "Tagged")]
#[get("/test")]
pub async fn test() -> EmptyResponse {
EmptyResponse
// Responds with "204 No Content"
}