pub struct Status(pub u16);Expand description
An HTTP status code, kept as a plain u16 so any code can be expressed.
Tuple Fields§
§0: u16Implementations§
Source§impl Status
impl Status
Sourcepub const SWITCHING_PROTOCOLS: Status
pub const SWITCHING_PROTOCOLS: Status
The handshake that hands a connection to another protocol.
pub const OK: Status
pub const CREATED: Status
pub const NO_CONTENT: Status
pub const FOUND: Status
pub const SEE_OTHER: Status
pub const NOT_MODIFIED: Status
pub const BAD_REQUEST: Status
pub const UNAUTHORIZED: Status
pub const FORBIDDEN: Status
pub const NOT_FOUND: Status
pub const METHOD_NOT_ALLOWED: Status
pub const CONFLICT: Status
pub const PAYLOAD_TOO_LARGE: Status
Sourcepub const PAGE_EXPIRED: Status
pub const PAGE_EXPIRED: Status
Laravel’s status for a rejected CSRF token: the form was rendered too long ago, or in another session.
pub const UNPROCESSABLE: Status
pub const TOO_MANY_REQUESTS: Status
pub const INTERNAL_ERROR: Status
pub const SERVICE_UNAVAILABLE: Status
pub fn code(self) -> u16
pub fn is_success(self) -> bool
pub fn is_redirect(self) -> bool
pub fn is_error(self) -> bool
Sourcepub fn is_bodyless(self) -> bool
pub fn is_bodyless(self) -> bool
Responses with these statuses must not carry a body.
pub fn reason(self) -> &'static str
Trait Implementations§
impl Copy for Status
impl Eq for Status
Source§impl IntoResponse for Status
impl IntoResponse for Status
fn into_response(self) -> Response
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