MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / from_byte

Method from_byte

atomic-core/src/change/attribute.rs:20–27  ·  view source on GitHub ↗

Decode the canonical one-byte representation.

(value: u8)

Source from the content-addressed store, hash-verified

18impl 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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected