pub struct Stack(_);
Expand description

Represent the stack file on disk.

Implementations

Creates a Stack object wrapping the supplied file.

Errors

Open the stack file for reading, return a File.

Errors

Return true if the timelog file exists

Truncates the stack file, removing all items from the stack.

Errors

Adds a new event to the stack file.

Errors

Remove the most recent task from the stack file and return the task string.

Remove one or more tasks from the stack file.

If arg is 0, remove one item. If arg is a positive number, remove that many items from the stack.

Errors
  • Return Error::StackPop if attempts to pop more items than exist in the stack file.

Remove everything except the top num tasks from the stack.

Format the stack as a String.

The stack will be formatted such that the most recent item is listed first.

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.