pub struct Code(/* private fields */);Expand description
An admitted three-digit HTTP response status.
Implementations§
Source§impl Code
impl Code
pub const CONTINUE: Self
pub const SWITCHING_PROTOCOLS: Self
pub const PROCESSING: Self
pub const EARLY_HINTS: Self
pub const OK: Self
pub const CREATED: Self
pub const ACCEPTED: Self
pub const NON_AUTHORITATIVE_INFORMATION: Self
pub const NO_CONTENT: Self
pub const RESET_CONTENT: Self
pub const PARTIAL_CONTENT: Self
pub const MULTI_STATUS: Self
pub const ALREADY_REPORTED: Self
pub const IM_USED: Self
pub const MULTIPLE_CHOICES: Self
pub const MOVED_PERMANENTLY: Self
pub const FOUND: Self
pub const SEE_OTHER: Self
pub const NOT_MODIFIED: Self
pub const USE_PROXY: Self
pub const TEMPORARY_REDIRECT: Self
pub const PERMANENT_REDIRECT: Self
pub const BAD_REQUEST: Self
pub const UNAUTHORIZED: Self
pub const PAYMENT_REQUIRED: Self
pub const FORBIDDEN: Self
pub const NOT_FOUND: Self
pub const METHOD_NOT_ALLOWED: Self
pub const NOT_ACCEPTABLE: Self
pub const PROXY_AUTHENTICATION_REQUIRED: Self
pub const REQUEST_TIMEOUT: Self
pub const CONFLICT: Self
pub const GONE: Self
pub const LENGTH_REQUIRED: Self
pub const PRECONDITION_FAILED: Self
pub const PAYLOAD_TOO_LARGE: Self
pub const URI_TOO_LONG: Self
pub const UNSUPPORTED_MEDIA_TYPE: Self
pub const RANGE_NOT_SATISFIABLE: Self
pub const EXPECTATION_FAILED: Self
pub const IM_A_TEAPOT: Self
pub const MISDIRECTED_REQUEST: Self
pub const UNPROCESSABLE_ENTITY: Self
pub const LOCKED: Self
pub const FAILED_DEPENDENCY: Self
pub const TOO_EARLY: Self
pub const UPGRADE_REQUIRED: Self
pub const PRECONDITION_REQUIRED: Self
pub const TOO_MANY_REQUESTS: Self
pub const REQUEST_HEADER_FIELDS_TOO_LARGE: Self
pub const UNAVAILABLE_FOR_LEGAL_REASONS: Self
pub const INTERNAL_SERVER_ERROR: Self
pub const NOT_IMPLEMENTED: Self
pub const BAD_GATEWAY: Self
pub const SERVICE_UNAVAILABLE: Self
pub const GATEWAY_TIMEOUT: Self
pub const HTTP_VERSION_NOT_SUPPORTED: Self
pub const VARIANT_ALSO_NEGOTIATES: Self
pub const INSUFFICIENT_STORAGE: Self
pub const LOOP_DETECTED: Self
pub const NOT_EXTENDED: Self
pub const NETWORK_AUTHENTICATION_REQUIRED: Self
Sourcepub const fn from_u16(actual: u16) -> Result<Self, Error>
pub const fn from_u16(actual: u16) -> Result<Self, Error>
Admits known and extension statuses within the five HTTP status classes.
pub const fn as_u16(&self) -> u16
pub const fn as_bytes(&self) -> [u8; 3]
pub const fn is_info(&self) -> bool
pub const fn is_success(&self) -> bool
pub const fn reason(&self) -> Option<&str>
Trait Implementations§
impl Copy for Code
impl Eq for Code
Source§impl Ord for Code
impl Ord for Code
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Code
impl PartialOrd for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Code
impl UnwindSafe for Code
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more