rocket_empty

Crates.iorocket_empty
lib.rsrocket_empty
version0.1.2
sourcesrc
created_at2023-01-18 14:47:16.660802
updated_at2024-10-21 14:34:06.664523
descriptionProvides a 204 No Content responder for Rocket. Includes optional schema definition.
homepage
repository
max_upload_size
id761728
size4,481
Paul Makles (insertish)

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