Expand description
HTTP status codes
This module contains HTTP-status code related structs an errors. The main
type in this module is StatusCode which is not intended to be used through
this module but rather the http::StatusCode type.
§Examples
use http::StatusCode;
assert_eq!(StatusCode::from_u16(200).unwrap(), StatusCode::OK);
assert_eq!(StatusCode::NOT_FOUND, 404);
assert!(StatusCode::OK.is_success());Structs§
- Invalid
Status Code - A possible error value when converting a
StatusCodefrom au16or&str - Status
Code - An HTTP status code (
status-codein RFC 7230 et al.).