Skip to main content

Stats

Struct Stats 

Source
#[non_exhaustive]
pub struct Stats {
Show 46 fields pub best_day: Option<BestDay>, pub categories: Vec<SummaryEntry>, pub created_at: String, pub daily_average: f64, pub daily_average_including_other_language: f64, pub days_including_holidays: u32, pub days_minus_holidays: u32, pub dependencies: Vec<SummaryEntry>, pub editors: Vec<SummaryEntry>, pub end: String, pub holidays: u32, pub human_readable_daily_average: String, pub human_readable_daily_average_including_other_language: String, pub human_readable_range: String, pub human_readable_total: String, pub human_readable_total_including_other_language: String, pub ai_additions: u32, pub ai_deletions: u32, pub human_additions: u32, pub human_deletions: u32, pub id: Option<String>, pub is_already_updating: bool, pub is_coding_activity_visible: bool, pub is_language_usage_visible: bool, pub is_editor_usage_visible: bool, pub is_category_usage_visible: bool, pub is_os_usage_visible: bool, pub is_stuck: bool, pub is_including_today: bool, pub is_up_to_date: bool, pub languages: Vec<SummaryEntry>, pub machines: Vec<MachineEntry>, pub modified_at: Option<String>, pub operating_systems: Vec<SummaryEntry>, pub percent_calculated: u32, pub projects: Vec<SummaryEntry>, pub range: String, pub start: String, pub status: String, pub timeout: u32, pub timezone: String, pub total_seconds: f64, pub total_seconds_including_other_language: f64, pub user_id: String, pub username: String, pub writes_only: bool,
}
Expand description

Aggregated coding stats for a predefined time range.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§best_day: Option<BestDay>

The day with the most coding activity.

§categories: Vec<SummaryEntry>

Time broken down by activity category.

§created_at: String

ISO 8601 timestamp when this stats snapshot was created.

§daily_average: f64

Average daily coding time in seconds, excluding “Other” language.

§daily_average_including_other_language: f64

Average daily coding time in seconds, including all languages.

§days_including_holidays: u32

Number of days in the range including weekends/holidays.

§days_minus_holidays: u32

Number of working days in the range (excluding days with no activity).

§dependencies: Vec<SummaryEntry>

Time broken down by detected dependency / library.

§editors: Vec<SummaryEntry>

Time broken down by editor.

§end: String

ISO 8601 end of the stats range.

§holidays: u32

Number of holiday / zero-activity days in the range.

§human_readable_daily_average: String

Human-readable average daily coding time, excluding “Other” language.

§human_readable_daily_average_including_other_language: String

Human-readable average daily coding time, including all languages.

§human_readable_range: String

Human-readable description of the range (e.g. "last 7 days").

§human_readable_total: String

Human-readable total coding time, excluding “Other” language.

§human_readable_total_including_other_language: String

Human-readable total coding time, including all languages.

§ai_additions: u32

Lines added by AI coding assistants (e.g. GitHub Copilot).

§ai_deletions: u32

Lines removed by AI coding assistants.

§human_additions: u32

Lines added by the developer via keyboard input.

§human_deletions: u32

Lines removed by the developer via keyboard input.

§id: Option<String>

Unique stats record identifier (not always present in the API response).

§is_already_updating: bool

Whether the stats snapshot is currently refreshing in the background.

§is_coding_activity_visible: bool

Whether this user’s coding activity is publicly visible.

§is_language_usage_visible: bool

Whether this user’s language usage is publicly visible.

§is_editor_usage_visible: bool

Whether this user’s editor usage is publicly visible.

§is_category_usage_visible: bool

Whether this user’s category usage is publicly visible.

§is_os_usage_visible: bool

Whether this user’s operating system usage is publicly visible.

§is_stuck: bool

Whether the stats calculation got stuck and will be retried.

§is_including_today: bool

Whether these stats include the current (partial) day.

§is_up_to_date: bool

Whether the stats snapshot is up to date.

§languages: Vec<SummaryEntry>

Time broken down by programming language.

§machines: Vec<MachineEntry>

Time broken down by machine.

§modified_at: Option<String>

ISO 8601 timestamp when this snapshot was last modified.

§operating_systems: Vec<SummaryEntry>

Time broken down by operating system.

§percent_calculated: u32

How fully computed the stats are (0–100).

§projects: Vec<SummaryEntry>

Time broken down by project.

§range: String

Named range (e.g. "last_7_days", "last_30_days").

§start: String

ISO 8601 start of the stats range.

§status: String

Computation status (e.g. "ok", "pending_update").

§timeout: u32

Heartbeat timeout in minutes used for this calculation.

§timezone: String

IANA timezone used when computing the stats.

§total_seconds: f64

Total coding time in seconds, excluding “Other” language.

§total_seconds_including_other_language: f64

Total coding time in seconds, including all languages.

§user_id: String

Owner user identifier (UUID).

§username: String

Owner username.

§writes_only: bool

Whether the account is in write-only mode.

Trait Implementations§

Source§

impl Clone for Stats

Source§

fn clone(&self) -> Stats

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Stats

Source§

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

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

impl<'de> Deserialize<'de> for Stats

Source§

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 Serialize for Stats

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§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnsafeUnpin for Stats

§

impl UnwindSafe for Stats

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,