Skip to main content

Contributor

Struct Contributor 

Source
pub struct Contributor {
Show 16 fields pub name: String, pub login: Option<String>, pub avatar: Option<String>, pub url: Option<String>, pub first: i64, pub last: i64, pub commits: u32, pub bot: bool, pub group: Option<String>, pub members: u32, pub member_names: Vec<String>, pub m0: i32, pub months: Vec<u32>, pub co_months: Vec<u32>, pub co_commits: u32, pub month_groups: Option<Vec<Option<String>>>,
}
Expand description

One merged contributor identity, ready for rendering. Also reused for affiliation aggregates, where one “row” stands for a whole organisation.

Fields§

§name: String§login: Option<String>§avatar: Option<String>§url: Option<String>§first: i64§last: i64§commits: u32§bot: bool§group: Option<String>§members: u32

Number of people behind this row (1 for an individual; N for an affiliation aggregate).

§member_names: Vec<String>

Names of the largest contributors in an aggregate (for tooltips).

§m0: i32

Month index (months since 1970-01) of the first entry in months.

§months: Vec<u32>

Commits per calendar month, from m0 through the last active month. Includes co-authored commits (full credit); co_months is the subset so the interactive page can subtract it when co-authors are toggled off.

§co_months: Vec<u32>

Co-authored commits per month, aligned to m0 (a subset of months).

§co_commits: u32

Of commits, how many the person was a co-author on (not the author).

§month_groups: Option<Vec<Option<String>>>

Per-month affiliation, aligned to m0, when the person has time-bounded manual affiliations (so their row is coloured by org over time). None when a single affiliation applies throughout (the usual case).

Trait Implementations§

Source§

impl Clone for Contributor

Source§

fn clone(&self) -> Contributor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Contributor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for Contributor

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.