statuses

Crates.iostatuses
lib.rsstatuses
version0.1.2
sourcesrc
created_at2022-11-12 08:37:03.281791
updated_at2022-11-12 09:12:21.619923
descriptionHTTP status utility for Rust
homepage
repositoryhttps://github.com/Kristories/statuses.rs
max_upload_size
id713529
size6,831
Wahyu Kristianto (Kristories)

documentation

https://docs.rs/statuses

README

Satuses

HTTP status utility for Rust.

Cargo

Put this in your Cargo.toml:

[dependencies]
statuses = "0.1"

Usage

message(code)

Returns the status message string for a known HTTP status code.

fn main() {
    // Unprocessable Entity
    println!("{}", statuses::message("422"));
}

code(message)

Returns the status code string for a known HTTP status message.

fn main() {
    // 403
    println!("{}", statuses::code("Forbidden"));
}
Commit count: 10

cargo fmt