pub struct FileOwnership {
pub path: String,
pub total_commits: u32,
pub authors: Vec<AuthorContribution>,
pub bus_factor: u32,
pub dominant_author_ratio: f64,
pub is_knowledge_silo: bool,
}Expand description
Ownership metrics for a single file.
§Examples
use argus_gitpulse::ownership::FileOwnership;
let ownership = FileOwnership {
path: "src/main.rs".into(),
total_commits: 20,
authors: vec![],
bus_factor: 3,
dominant_author_ratio: 0.45,
is_knowledge_silo: false,
};
assert!(!ownership.is_knowledge_silo);Fields§
§path: StringFile path relative to repo root.
total_commits: u32Total commits touching this file.
Per-author contribution breakdown.
bus_factor: u32Number of authors with >10% contribution.
max(author_commits) / total_commits.
is_knowledge_silo: boolWhether dominant_author_ratio > 0.80.
Trait Implementations§
Source§impl Clone for FileOwnership
impl Clone for FileOwnership
Source§fn clone(&self) -> FileOwnership
fn clone(&self) -> FileOwnership
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileOwnership
impl Debug for FileOwnership
Source§impl<'de> Deserialize<'de> for FileOwnership
impl<'de> Deserialize<'de> for FileOwnership
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
Auto Trait Implementations§
impl Freeze for FileOwnership
impl RefUnwindSafe for FileOwnership
impl Send for FileOwnership
impl Sync for FileOwnership
impl Unpin for FileOwnership
impl UnsafeUnpin for FileOwnership
impl UnwindSafe for FileOwnership
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