musli_core/de/skip.rs
1/// Indicates if skipping was performed.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3#[non_exhaustive]
4pub enum Skip {
5 /// Indicates that skipping was not supported.
6 Unsupported,
7 /// Indicates that skipping was successfully performed.
8 Skipped,
9}
10
11impl Skip {
12 /// Indicates if a skip was not supported.
13 #[inline(always)]
14 pub fn is_unsupported(self) -> bool {
15 self == Skip::Unsupported
16 }
17
18 /// Indicates if a skip was performed.
19 #[inline(always)]
20 pub fn is_skipped(self) -> bool {
21 self == Skip::Skipped
22 }
23}