Struct todo_lib::todo::Conf[][src]

pub struct Conf {
Show 14 fields pub subject: Option<String>, pub priority: u8, pub priority_act: Action, pub due: Option<NaiveDate>, pub due_act: Action, pub thr: Option<NaiveDate>, pub thr_act: Action, pub recurrence: Option<Recurrence>, pub recurrence_act: Action, pub projects: Vec<String>, pub project_act: Action, pub contexts: Vec<String>, pub context_act: Action, pub auto_create_date: bool, // some fields omitted
}
Expand description

The list of changes to apply to all records in a list. All operations with text are case insensitive, so if you, e.g., try to replace a project projectone to ProjectOne no todo is updated

Fields

subject: Option<String>

New subject replaces the old one. Trying to change the subject for more than one todo results in that only the first todo in list is changed, all the rest todos are skipped.

NOTE: the new subject must contain all required attributes: projects, contexts, recurrence, due date etc because after assigning a new subject it is parsed and all todo properties are filled with parsed data

priority: u8

New priority (is not used if action is Delete, IncreaseorDecrease`)

priority_act: Action

Type of operation applied to old priority

due: Option<NaiveDate>

New due date

due_act: Action

Type of operation applied to old due date

thr: Option<NaiveDate>

New threshold date

thr_act: Action

Type of operation applied to old threshold date

recurrence: Option<Recurrence>

New recurrence

recurrence_act: Action

Type of operation applied to old recurrence

projects: Vec<String>

List of projects. For Set and Delete is a list of strings; For Replace it is a list of strings containing pairs in format: old_project+new_project

project_act: Action

Type of operation applied to projects

contexts: Vec<String>

List of contexts. For Set and Delete is a list of strings; For Replace it is a list of strings containing pairs in format: old_context@new_context

context_act: Action

Type of operation applied to contexts

auto_create_date: bool

Automatically set creation date to today if it is not defined in subject when adding a new todo

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

Returns the “default value” for a type. 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.