https://github.com/revoltchat/rocket_empty
https://github.com/revoltchat/rocket_empty
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/revoltchat/rocket_empty
- Owner: revoltchat
- License: mit
- Created: 2022-06-02T14:06:54.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T14:33:31.000Z (over 1 year ago)
- Last Synced: 2025-01-08T02:14:38.236Z (over 1 year ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```rust
use rocket_empty::EmptyResponse;
#[openapi(tag = "Tagged")]
#[get("/test")]
pub async fn test() -> EmptyResponse {
EmptyResponse
// Responds with "204 No Content"
}
```