pub struct Statistics {
pub commit_count: usize,
pub commits_timespan: Option<i64>,
pub conventional_commit_count: usize,
pub links: Vec<LinkCount>,
pub days_passed_since_last_release: Option<i64>,
}
Expand description
Aggregated statistics about commits in the release.
Fields§
§commit_count: usize
The total number of commits included in the release.
commits_timespan: Option<i64>
The time span, in days, from the first to the last commit in the release. Only present if there is more than one commit.
conventional_commit_count: usize
The number of commits that follow the Conventional Commits specification.
links: Vec<LinkCount>
The number of times each link was referenced in commit messages.
days_passed_since_last_release: Option<i64>
The number of days since the previous release. Only present if this is not the first release.
Trait Implementations§
Source§impl Clone for Statistics
impl Clone for Statistics
Source§fn clone(&self) -> Statistics
fn clone(&self) -> Statistics
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 Statistics
impl Debug for Statistics
Source§impl Default for Statistics
impl Default for Statistics
Source§fn default() -> Statistics
fn default() -> Statistics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Statistics
impl<'de> Deserialize<'de> for Statistics
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 From<&Release<'_>> for Statistics
impl From<&Release<'_>> for Statistics
Source§fn from(release: &Release<'_>) -> Self
fn from(release: &Release<'_>) -> Self
Aggregates various statistics from the release data.
This method computes several metrics based on the current release and its commits:
- Counts the total number of commits.
- Determines the number of days between the first and last commit.
- Counts the number of commits that follow the Conventional Commits specification.
- Tallies how many times each link appears across all commit messages.
- Calculates the number of days since the previous release, if available.
Source§impl PartialEq for Statistics
impl PartialEq for Statistics
Source§impl Serialize for Statistics
impl Serialize for Statistics
impl StructuralPartialEq for Statistics
Auto Trait Implementations§
impl Freeze for Statistics
impl RefUnwindSafe for Statistics
impl Send for Statistics
impl Sync for Statistics
impl Unpin for Statistics
impl UnwindSafe for Statistics
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
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>
Converts
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>
Converts
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