Struct tsk_lib::list::List [−][src]
Fields
tasks: Vec<Task>
Methods
impl List
[src]
impl List
pub fn new(tasks: Vec<Task>) -> List
[src]
pub fn new(tasks: Vec<Task>) -> List
pub fn current<'a>(&'a mut self) -> Option<&'a mut Task>
[src]
pub fn current<'a>(&'a mut self) -> Option<&'a mut Task>
Return a reference to the "current" task.
pub fn add(&mut self, task: Task)
[src]
pub fn add(&mut self, task: Task)
Add a task to the List, will sort after adding.
pub fn add_multiple(&mut self, tasks: &mut Vec<Task>)
[src]
pub fn add_multiple(&mut self, tasks: &mut Vec<Task>)
Add multiple tasks to the List, this is more efficient than calling add multiple times since only one sort is performed. It will empty the given vector.
pub fn find_by_ind<'a>(&'a mut self, id: usize) -> Option<&'a mut Task>
[src]
pub fn find_by_ind<'a>(&'a mut self, id: usize) -> Option<&'a mut Task>
Return a reference to the task at the given ID / index.
pub fn find_by_title<'a>(&'a mut self, title: &str) -> Option<&'a mut Task>
[src]
pub fn find_by_title<'a>(&'a mut self, title: &str) -> Option<&'a mut Task>
Return a reference to the first task with the given title.
pub fn enumerate(&self) -> Enumerate<Iter<Task>>
[src]
pub fn enumerate(&self) -> Enumerate<Iter<Task>>
Return an enumerated iterator over the tasks in this list.
pub fn to_json(&self) -> Result<String, Error>
[src]
pub fn to_json(&self) -> Result<String, Error>
pub fn context(&self, context: &str) -> List
[src]
pub fn context(&self, context: &str) -> List
pub fn search<'a>(&'a mut self, query: AST) -> Vec<&'a Task>
[src]
pub fn search<'a>(&'a mut self, query: AST) -> Vec<&'a Task>
Trait Implementations
impl Default for List
[src]
impl Default for List
impl Debug for List
[src]
impl Debug for List
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for List
[src]
impl Clone for List
fn clone(&self) -> List
[src]
fn clone(&self) -> List
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for List
[src]
impl PartialEq for List
fn eq(&self, other: &List) -> bool
[src]
fn eq(&self, other: &List) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &List) -> bool
[src]
fn ne(&self, other: &List) -> bool
This method tests for !=
.
impl IntoIterator for List
[src]
impl IntoIterator for List
type Item = Task
The type of the elements being iterated over.
type IntoIter = IntoIter<Task>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl Display for List
[src]
impl Display for List