Struct todo_lib::tfilter::Conf

source ·
pub struct Conf {
    pub range: ItemRange,
    pub projects: Vec<String>,
    pub contexts: Vec<String>,
    pub regex: Option<String>,
    pub use_regex: bool,
    pub all: TodoStatus,
    pub due: Option<Due>,
    pub thr: Option<Due>,
    pub rec: Option<Recurrence>,
    pub pri: Option<Priority>,
}
Expand description

A rules for todo list filtering. Setting a field to None or empty vector means that the corresponding property is not checked. All text comparisons are case-insensitive.

Fields

range: ItemRange

Range of todo IDs

projects: Vec<String>

List of all project tags that a todo must include. The search supports very limited pattern matching:

  • foo* - finds all todos with projects that starts with foo
  • *foo - finds all todos with projects that ends with foo
  • *foo* - finds all todos with projects that contains foo
contexts: Vec<String>

List of all context tags that a todo must include. The search supports very limited pattern matching:

  • foo* - finds all todos with contexts that starts with foo
  • *foo - finds all todos with contexts that ends with foo
  • *foo* - finds all todos with contexts that contains foo
regex: Option<String>

A text that any of text, project, or context must contain

use_regex: bool

If it is true, regex is treated as regular expression. If use_regex is false, the value of regex is just a substring to search for

all: TodoStatus

All incomplete, completed, or both types of todos

due: Option<Due>

Search for a due date: any, no due date, or withing range

thr: Option<Due>

Search for a threshold date: any, no threshold date, or withing range

rec: Option<Recurrence>

Search for a recurrent todos

pri: Option<Priority>

Search for a todos with priority or priority range

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

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
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.