pub struct OwnershipFacts {
pub group_count: usize,
pub transitive_only_count: usize,
pub unowned_direct_count: usize,
pub groups: Vec<OwnerGroupFact>,
pub groups_omitted: usize,
pub slices: Vec<OwnershipSliceFact>,
}Expand description
How far a changeset reaches across CODEOWNERS owner groups.
Computed from the CODEOWNERS file alone: no git history is read, so the
section is present whenever a CODEOWNERS file is found, also when the churn
walk behind routing finds nothing. Each file maps to its primary owner
(the first owner of the last matching rule). A file that no rule matches,
or that a GitLab negation rule matches, belongs to the (unowned) group.
The owner strings use the same vocabulary as routing.units[].expert.
Absent from the brief when no CODEOWNERS file is found, or when the file
cannot be read or does not parse. A configured codeowners path that
fails also prints a warning on stderr.
groups[].direct_count counts all changed files, source or not, so the
sum over all groups is the number of changed files, not the size of
impact_closure.in_diff. Slice owners count only the files of the
partition units, which are source files.
Fields§
§group_count: usizeDistinct owner groups across the changed files and the impact closure.
The (unowned) group counts as one group. Exact, never capped.
transitive_only_count: usizeOwner groups that own no changed file and appear only through the impact closure. Exact, never capped.
unowned_direct_count: usizeChanged files that belong to the (unowned) group.
groups: Vec<OwnerGroupFact>The owner groups, sorted by direct_count descending, then
affected_count descending, then owner. At most OWNER_GROUP_CAP
entries. The counts in each entry are exact.
groups_omitted: usizeHow many owner groups did not fit within OWNER_GROUP_CAP and are
absent from groups. Zero when nothing was omitted.
slices: Vec<OwnershipSliceFact>The owner set of each independent slice, aligned by index with
partition.independent_slices. Present only when that list is present
(two or more slices). A fact for the reviewer, never a demand to split.
Trait Implementations§
Source§impl Clone for OwnershipFacts
impl Clone for OwnershipFacts
Source§fn clone(&self) -> OwnershipFacts
fn clone(&self) -> OwnershipFacts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OwnershipFacts
impl Debug for OwnershipFacts
Source§impl Default for OwnershipFacts
impl Default for OwnershipFacts
Source§fn default() -> OwnershipFacts
fn default() -> OwnershipFacts
Source§impl Serialize for OwnershipFacts
impl Serialize for OwnershipFacts
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,
Auto Trait Implementations§
impl Freeze for OwnershipFacts
impl RefUnwindSafe for OwnershipFacts
impl Send for OwnershipFacts
impl Sync for OwnershipFacts
impl Unpin for OwnershipFacts
impl UnsafeUnpin for OwnershipFacts
impl UnwindSafe for OwnershipFacts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more