libvctrl_handler 1.0.0

Fundamental contracts for building a version control system – no implementations, only traits and types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Core enums used by the fundamental types.

/// The kind of an entry inside a [`Tree`](crate::Tree).
///
/// In a version control system, a tree represents a directory.
/// Each entry can be either a file ([`Blob`](crate::Blob)) or a
/// sub‑directory ([`Tree`](crate::Tree) itself).
#[non_exhaustive]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum EntryKind {
    /// A regular file. The entry's hash points to a [`Blob`](crate::Blob).
    Blob,
    /// A sub‑directory. The entry's hash points to another [`Tree`](crate::Tree).
    Tree,
}