Skip to main content

http_type/status/
impl.rs

1use crate::*;
2
3/// Implementation block for `Status`.
4///
5/// Provides convenience methods for checking the status variant.
6impl Status {
7    /// Returns `true` if the status is `Continue`.
8    ///
9    /// # Returns
10    ///
11    /// - `bool` - `true` if the status is `Continue`, `false` otherwise.
12    #[inline(always)]
13    pub fn is_continue(&self) -> bool {
14        matches!(self, Status::Continue)
15    }
16
17    /// Returns `true` if the status is `Reject`.
18    ///
19    /// # Returns
20    ///
21    /// - `bool` - `true` if the status is `Reject`, `false` otherwise.
22    #[inline(always)]
23    pub fn is_reject(&self) -> bool {
24        matches!(self, Status::Reject)
25    }
26}