Struct timelog::day::Day

source · []
pub struct Day { /* private fields */ }
Expand description

Type representing a day and all associated tasks

Implementations

Creates a Day struct that collects the entries for the date specified by the stamp.

Errors

Return the duration of the day in seconds

Returns true only if no entries have been added to the day.

Returns true only the day is complete.

Return the date stamp for the day in ‘YYYY-MM-DD’ form.

Return the date for the Day object in a Date.

Return an iterator over the project names for today

Return an iterator over the events for today.

source

pub fn add_entry(&mut self, entry: &Entry) -> Result<()>

Add an Entry to the current Day.

Errors
  • Return an EntryOrder error if the new entry is before the previous entry.

Update the duration of the most recent task

Errors
  • Return an EntryOrder error if the new entry is before the previous entry.

Update the duration of the most recent task

Errors
  • Return an EntryOrder error if the new entry is before the previous entry.

Start a day from previous day’s last entry.

Errors
  • Return an EntryOrder error if the new entry is before the previous entry.

Initialize a new task item in the day based on the Entry object supplied in event.

This method only starts a task if no previous matching task exists in the day.

Return a DetailReport from the current Day.

Return a SummaryReport from the current Day.

Return a HoursReport from the current Day.

Return a HoursReport from the current Day.

Return a DailyChart from the current Day.

Return true if the day contains one or more tasks.

Make a copy of the current Day object containing only the tasks associated with a supplied Regex.

Return a Vec of tuples mapping project name to percentage of the overall time this project took.

Return a Vec of tuples mapping the task name and percentage of the supplied project.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.