#[non_exhaustive]pub enum StatsRange {
Last7Days,
Last30Days,
Last6Months,
LastYear,
AllTime,
}Expand description
Predefined time ranges accepted by the GET /users/current/stats/{range}
endpoint.
This enum is #[non_exhaustive] — new ranges may be added in future
minor versions as the WakaTime API evolves. Always include a wildcard
arm when matching on it.
§Example
use waka_api::StatsRange;
let path_segment = StatsRange::Last7Days.as_str();
assert_eq!(path_segment, "last_7_days");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Last7Days
The last 7 days.
Last30Days
The last 30 days.
Last6Months
The last 6 months.
LastYear
The last year.
AllTime
All time since the account was created.
Implementations§
Trait Implementations§
Source§impl Clone for StatsRange
impl Clone for StatsRange
Source§fn clone(&self) -> StatsRange
fn clone(&self) -> StatsRange
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 StatsRange
impl Debug for StatsRange
Source§impl PartialEq for StatsRange
impl PartialEq for StatsRange
impl Copy for StatsRange
impl Eq for StatsRange
impl StructuralPartialEq for StatsRange
Auto Trait Implementations§
impl Freeze for StatsRange
impl RefUnwindSafe for StatsRange
impl Send for StatsRange
impl Sync for StatsRange
impl Unpin for StatsRange
impl UnsafeUnpin for StatsRange
impl UnwindSafe for StatsRange
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.