pub struct Group(pub usize);Expand description
An integer that separates distinct groups of Ids.
This can be seen as a way to pre-allocate consecutive integers for one group to make segments less fragmented.
(Group, Id) are also topologically sorted.
Tuple Fields§
§0: usizeImplementations§
Source§impl Group
impl Group
Sourcepub const MASTER: Self
pub const MASTER: Self
The “master” group. usually ancestors(master).
- Expected to have most of the commits in a repo.
- Ideally free from fragmentation. In other words,
ancestors(master)can be represented in a single Span. - Ideally has limited heads. Does not scale with too many heads.
- Vertexs (commit hashes) might be lazy.
Sourcepub const NON_MASTER: Self
pub const NON_MASTER: Self
The “non-master” group.
- Concrete vertexes not in the “master” group. For example, public release branches, local feature branches.
- Expected to have multiple heads. In other words, is fragmented.
- Expected to be sparse referred. For example, the “visible heads” will refer to a bounded subset in this group.
- Expected to be non-lazy. Code paths assume Vertexs (commit hashes) are known in this group.
Sourcepub const VIRTUAL: Self
pub const VIRTUAL: Self
The “virtual” group.
- Typically, “null” and “wdir()”.
- Should not be written to disk.
- Not lazy.
pub const ALL: [Self; 3]
pub const MAX: Self
pub const COUNT: usize
pub const BITS: u32 = 8
pub const BYTES: usize = 1
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Group
impl<'de> Deserialize<'de> for Group
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Group
impl Ord for Group
Source§impl PartialOrd for Group
impl PartialOrd for Group
impl Copy for Group
impl Eq for Group
impl StructuralPartialEq for Group
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnsafeUnpin for Group
impl UnwindSafe for Group
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