musli_core/de/
skip.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/// Indicates if skipping was performed.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum Skip {
    /// Indicates that skipping was not supported.
    Unsupported,
    /// Indicates that skipping was successfully performed.
    Skipped,
}

impl Skip {
    /// Indicates if a skip was not supported.
    #[inline(always)]
    pub fn is_unsupported(self) -> bool {
        self == Skip::Unsupported
    }

    /// Indicates if a skip was performed.
    #[inline(always)]
    pub fn is_skipped(self) -> bool {
        self == Skip::Skipped
    }
}