pub struct Entry { /* private fields */ }
Expand description

Representation of an entry in the log

Objects of this type represent individual lines in the timelog.txt file. Each Entry has a date and time stamp, an optional project, and a task.

Implementations

Parse the entry line text into the task name and detail parts if they exist.

Return true if the supplied string looks like a stop line.

Extract a date/time string from a task line

Extract a date string from a task line

Return the year for the supplied entry line, if any.

Return true if the supplied line is a comment.

Create a new Entry representing the supplied task at the supplied time.

Create a new Entry representing the supplied task at the supplied time and optional mark.

Create a new Entry representing a stop entry for the supplied DateTime

Create a new Entry representing the entry from the supplied line.

This entry must be formatted as described in Format.md.

Errors

Return an EntryError if the line is empty or formatted incorrectly.

Return the String designated as the project, if any, from the Entry.

Return the String containing all of the Entry except the time and date.

Return the String containing all of the Entry except the time and date.

Return the String containing all of the Entry except the time and date.

Return the String containing all of the Entry except the time and date.

Return the time for the start of the Entry in epoch seconds.

Return the date for the start of the Entry as a Date

Return the time for the start of the Entry as a DateTime

Return the date stamp of the Entry in ‘YYYY-MM-DD’ format.

Return true if this a start Entry.

Return true if this was a stop Entry.

Return true if this was an ignored Entry.

Return an ignored Entry converted from this one.

Return true if this was a event Entry.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Format the Entry formatted as described in Format.md.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists.

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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 resulting type after obtaining ownership.

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

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

Converts the given value to a String. Read more

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.