#[repr(u16)]pub enum NodeKind {
TextFile = 1,
BinaryFile = 2,
Symlink = 3,
}Expand description
Node kind. FDD-03 §9.3.0 NodeKind (enum_u16). Used by DeleteNode
(old_node_kind) and state-tree entries (§10.2). 0x0000 is reserved/invalid.
Variants§
Implementations§
Source§impl NodeKind
impl NodeKind
Sourcepub fn from_code(code: u16) -> Result<Self>
pub fn from_code(code: u16) -> Result<Self>
Parse a stable code. Rejects 0x0000 (INVALID/reserved) and unknown values.
Sourcepub fn from_file_blob_kind(blob_kind: BlobKind) -> Result<Self>
pub fn from_file_blob_kind(blob_kind: BlobKind) -> Result<Self>
Derive a file node’s kind from its referenced blob’s blob_kind (§9.3.0).
A file node MUST NOT reference a SNAPSHOT blob.
Trait Implementations§
impl Copy for NodeKind
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more