Decode the canonical one-byte representation.
(value: u8)
| 18 | impl InodeKind { |
| 19 | /// Decode the canonical one-byte representation. |
| 20 | pub const fn from_byte(value: u8) -> Option<Self> { |
| 21 | match value { |
| 22 | 0 => Some(Self::Regular), |
| 23 | 1 => Some(Self::Symlink), |
| 24 | 2 => Some(Self::Gitlink), |
| 25 | _ => None, |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /// Return the canonical one-byte representation. |
| 30 | pub const fn as_byte(self) -> u8 { |
nothing calls this directly
no outgoing calls
no test coverage detected