tayvo_rocket_empty

Crates.iotayvo_rocket_empty
lib.rstayvo_rocket_empty
version0.1.2
created_at2025-09-02 17:36:19.429202+00
updated_at2025-09-02 17:36:19.429202+00
descriptionProvides a 204 No Content responder for Rocket. Includes optional schema definition.
homepage
repository
max_upload_size
id1821454
size51,270
(tayvochat)

documentation

README

rocket_empty

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.

Usage

use rocket_empty::EmptyResponse;

#[openapi(tag = "Tagged")]
#[get("/test")]
pub async fn test() -> EmptyResponse {
    EmptyResponse
    // Responds with "204 No Content"
}
Commit count: 0

cargo fmt