Struct task_hookrs::task::Task
[−]
[src]
pub struct Task { /* fields omitted */ }Task type
A task must have four things:
- A Status
- An UUID
- An Entry-Date
- A Description
all other Data is optional by taskwarrior. This type is a simple rust representation of the JSON exported by taskwarrior.
It is deserializeable and serializeable via serde_json, so importing and exporting taskwarrior tasks is simply serializing and deserializing objects of this type.
Methods
impl Task[src]
pub fn new(
status: TaskStatus,
uuid: Uuid,
entry: Date,
description: String,
annotations: Option<Vec<Annotation>>,
depends: Option<String>,
due: Option<Date>,
end: Option<Date>,
imask: Option<i64>,
mask: Option<String>,
modified: Option<Date>,
parent: Option<Uuid>,
priority: Option<TaskPriority>,
project: Option<Project>,
recur: Option<String>,
scheduled: Option<Date>,
start: Option<Date>,
tags: Option<Vec<Tag>>,
until: Option<Date>,
wait: Option<Date>
) -> Task[src]
status: TaskStatus,
uuid: Uuid,
entry: Date,
description: String,
annotations: Option<Vec<Annotation>>,
depends: Option<String>,
due: Option<Date>,
end: Option<Date>,
imask: Option<i64>,
mask: Option<String>,
modified: Option<Date>,
parent: Option<Uuid>,
priority: Option<TaskPriority>,
project: Option<Project>,
recur: Option<String>,
scheduled: Option<Date>,
start: Option<Date>,
tags: Option<Vec<Tag>>,
until: Option<Date>,
wait: Option<Date>
) -> Task
Create a new Task instance
pub fn status(&self) -> &TaskStatus[src]
Get the status of the task
pub fn status_mut(&mut self) -> &mut TaskStatus[src]
Get the status of the task mutable
pub fn uuid(&self) -> &Uuid[src]
Get the uuid of the task
pub fn uuid_mut(&mut self) -> &mut Uuid[src]
Get the uuid of the task mutable
pub fn entry(&self) -> &Date[src]
Get the entry date of the task
pub fn entry_mut(&mut self) -> &mut Date[src]
Get the entry date of the task mutable
pub fn description(&self) -> &String[src]
Get the description of the task
pub fn description_mut(&mut self) -> &mut String[src]
Get the description of the task mutable
pub fn annotations(&self) -> Option<&Vec<Annotation>>[src]
Get the annotations of the task
pub fn annotations_mut(&mut self) -> Option<&mut Vec<Annotation>>[src]
Get the annotations of the task mutable
pub fn depends(&self) -> Option<&String>[src]
Get the depends of the task
This is exported as String by now, which might change in future
pub fn depends_mut(&mut self) -> Option<&mut String>[src]
This is exported as String by now, which might change in future mutable
pub fn due(&self) -> Option<&Date>[src]
Get the due date of the task
pub fn due_mut(&mut self) -> Option<&mut Date>[src]
Get the due date of the task mutable
pub fn end(&self) -> Option<&Date>[src]
Get the end date of the task
pub fn end_mut(&mut self) -> Option<&mut Date>[src]
Get the end date of the task mutable
pub fn imask(&self) -> Option<&i64>[src]
Get the imask of the task
pub fn imask_mut(&mut self) -> Option<&mut i64>[src]
Get the imask of the task mutable
pub fn mask(&self) -> Option<&String>[src]
Get the mask of the task
pub fn mask_mut(&mut self) -> Option<&mut String>[src]
Get the mask of the task mutable
pub fn modified(&self) -> Option<&Date>[src]
Get the modified date of the task
pub fn modified_mut(&mut self) -> Option<&mut Date>[src]
Get the modified date of the task mutable
pub fn parent(&self) -> Option<&Uuid>[src]
Get the parent of the task
pub fn parent_mut(&mut self) -> Option<&mut Uuid>[src]
Get the parent of the task mutable
pub fn priority(&self) -> Option<&TaskPriority>[src]
Get the priority of the task
pub fn priority_mut(&mut self) -> Option<&mut TaskPriority>[src]
Get the priority of the task mutable
pub fn project(&self) -> Option<&Project>[src]
Get the project of the task
pub fn project_mut(&mut self) -> Option<&mut Project>[src]
Get the project of the task mutable
pub fn recur(&self) -> Option<&String>[src]
Get the recur of the task
This is exported as String by now. This might change in future versions of this crate.
pub fn recur_mut(&mut self) -> Option<&mut String>[src]
This is exported as String by now. This might change in future versions of this crate. mutable
pub fn scheduled(&self) -> Option<&Date>[src]
Get the scheduled date of the task
pub fn scheduled_mut(&mut self) -> Option<&mut Date>[src]
Get the scheduled date of the task mutable
pub fn start(&self) -> Option<&Date>[src]
Get the start date of the task
pub fn start_mut(&mut self) -> Option<&mut Date>[src]
Get the start date of the task mutable
[src]
Get the tags of the task
[src]
Get the tags of the task mutable
pub fn until(&self) -> Option<&Date>[src]
Get the until date of the task
pub fn until_mut(&mut self) -> Option<&mut Date>[src]
Get the until date of the task mutable
pub fn wait(&self) -> Option<&Date>[src]
Get the wait date of the task
pub fn wait_mut(&mut self) -> Option<&mut Date>[src]
Get the wait date of the task mutable
Trait Implementations
impl Debug for Task[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more