Enum todo_lib::todo::Action[][src]

pub enum Action {
    None,
    Set,
    Delete,
    Replace,
    Increase,
    Decrease,
}
Expand description

Type of operation applied to todo properties. Every field supports its own set of operations (except None that can be used for all of them):

  • priority: Set, Delete, Increase, Decrease;
  • due date: Set, Delete;
  • recurrence: Set, Delete;
  • projects: Set, Delete, Replace;
  • contexts: Set, Delete, Replace;

Variants

None

do not touch the property

Set

Priority, due date, and recurrence: set the new value; Projects and contexts: add a new value to the list;

Delete

Remove the value

Replace

Replace old value with a new one. The format for the new value: projects: old_value+new_value contexts: old_value@new_value

Increase

Only for priority: increases the priority by one level. If a todo has A priority the todo is not changed. If a todo does not have a priority it gets the lowest one Z

Decrease

Only for priority: decreases the priority by one level. If a todo has no priority the todo is not changed. If a todo has the lowest priority Z the priority is removed

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

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.