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: Group = Self(0)
pub const MASTER: Group = Self(0)
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: Group = Self(1)
pub const NON_MASTER: Group = Self(1)
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: [Group; 2] = [Self::MASTER, Self::NON_MASTER]
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<Group, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Group, <__D as Deserializer<'de>>::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 moresource§impl Serialize for Group
impl Serialize for Group
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Group
impl Eq for Group
impl StructuralEq for Group
impl StructuralPartialEq for Group
Auto Trait Implementations§
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnwindSafe for Group
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.