pub struct Status(/* private fields */);Expand description
An HTTP status code in the range 100..=599, including unknown codes.
Implementations§
Source§impl Status
impl Status
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 NO_CONTENT: Self
pub const RESET_CONTENT: Self
pub const PARTIAL_CONTENT: Self
pub const MOVED_PERMANENTLY: Self
pub const FOUND: Self
pub const SEE_OTHER: Self
pub const NOT_MODIFIED: Self
pub const TEMPORARY_REDIRECT: Self
pub const PERMANENT_REDIRECT: Self
pub const BAD_REQUEST: Self
pub const UNAUTHORIZED: Self
pub const FORBIDDEN: Self
pub const NOT_FOUND: Self
pub const METHOD_NOT_ALLOWED: Self
pub const REQUEST_TIMEOUT: Self
pub const CONFLICT: Self
pub const CONTENT_TOO_LARGE: Self
pub const EXPECTATION_FAILED: Self
pub const TOO_MANY_REQUESTS: 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 fn new(code: u16) -> Result<Self, InvalidStatus>
pub const fn as_u16(self) -> u16
pub const fn is_informational(self) -> bool
Sourcepub const fn is_final(self) -> bool
pub const fn is_final(self) -> bool
Switching protocols ends an HTTP/1 exchange despite its 1xx class.
pub const fn is_continue(self) -> bool
pub const fn is_ok(self) -> bool
pub const fn is_success(self) -> bool
pub const fn is_partial(self) -> bool
pub const fn is_redirection(self) -> bool
pub const fn is_not_modified(self) -> bool
pub const fn preserves_method(self) -> bool
pub const fn is_failure(self) -> bool
pub const fn is_client_error(self) -> bool
pub const fn is_server_error(self) -> bool
Sourcepub const fn description(self) -> Option<&'static str>
pub const fn description(self) -> Option<&'static str>
A conventional description, independent of the wire version/reason phrase.
Trait Implementations§
impl Copy for Status
impl Eq for Status
Source§impl Ord for Status
impl Ord for Status
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 Status
impl PartialOrd for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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