Expand description
Gemini Status Codes
This module contains types to represent Gemini response statuses, construct
them from numbers or byte-strings, as well as to process them by Category
to allow for “simple but complete” clients and servers as mentioned in the
Gemini spec.
Examples
use gemini::{Category, Status};
assert_eq!(Status::from_u8(20).unwrap(), Status::SUCCESS);
assert_eq!(Status::NOT_FOUND.code_number(), 51);
assert_eq!(Status::TEMPORARY_REDIRECT.category(), Category::Redirect)
inspiration taken from https://github.com/hyperium/http/blob/master/src/status.rs
note: currently constant and Code
doc comments are taken verbatim from
the Gemini spec.
Modules
Parser
Structs
Error to indicate a failure in parsing a Status
from a numeric or textual
code.
A Gemini status response.