pub struct Group(pub usize);
Expand description
An integer that separates distinct groups of Id
s.
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: usize
Implementations§
source§impl Group
impl Group
sourcepub const MASTER: Self = _
pub const MASTER: Self = _
The “master” group. ancestors(master)
.
- Expected to have most of the commits in a repo.
- Expected to be free from fragmentation. In other words,
ancestors(master)
can be represented in a single Span.
sourcepub const NON_MASTER: Self = _
pub const NON_MASTER: Self = _
The “non-master” group.
- Anything not in
ancestors(master)
. 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.
pub const ALL: [Self; 2] = _
pub const COUNT: usize = 2usize
pub const BITS: u32 = 8u32
pub const BYTES: usize = 1usize
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 PartialEq<Group> for Group
impl PartialEq<Group> for Group
source§impl PartialOrd<Group> for Group
impl PartialOrd<Group> for Group
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more