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]
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
fn status(&self) -> &TaskStatus
[src]
Get the status of the task
fn status_mut(&mut self) -> &mut TaskStatus
[src]
Get the status of the task mutable
fn uuid(&self) -> &Uuid
[src]
Get the uuid of the task
fn uuid_mut(&mut self) -> &mut Uuid
[src]
Get the uuid of the task mutable
fn entry(&self) -> &Date
[src]
Get the entry date of the task
fn entry_mut(&mut self) -> &mut Date
[src]
Get the entry date of the task mutable
fn description(&self) -> &String
[src]
Get the description of the task
fn description_mut(&mut self) -> &mut String
[src]
Get the description of the task mutable
fn annotations(&self) -> Option<&Vec<Annotation>>
[src]
Get the annotations of the task
fn annotations_mut(&mut self) -> Option<&mut Vec<Annotation>>
[src]
Get the annotations of the task mutable
fn depends(&self) -> Option<&String>
[src]
Get the depends of the task
This is exported as String by now, which might change in future
fn depends_mut(&mut self) -> Option<&mut String>
[src]
This is exported as String by now, which might change in future mutable
fn due(&self) -> Option<&Date>
[src]
Get the due date of the task
fn due_mut(&mut self) -> Option<&mut Date>
[src]
Get the due date of the task mutable
fn end(&self) -> Option<&Date>
[src]
Get the end date of the task
fn end_mut(&mut self) -> Option<&mut Date>
[src]
Get the end date of the task mutable
fn imask(&self) -> Option<&i64>
[src]
Get the imask of the task
fn imask_mut(&mut self) -> Option<&mut i64>
[src]
Get the imask of the task mutable
fn mask(&self) -> Option<&String>
[src]
Get the mask of the task
fn mask_mut(&mut self) -> Option<&mut String>
[src]
Get the mask of the task mutable
fn modified(&self) -> Option<&Date>
[src]
Get the modified date of the task
fn modified_mut(&mut self) -> Option<&mut Date>
[src]
Get the modified date of the task mutable
fn parent(&self) -> Option<&Uuid>
[src]
Get the parent of the task
fn parent_mut(&mut self) -> Option<&mut Uuid>
[src]
Get the parent of the task mutable
fn priority(&self) -> Option<&TaskPriority>
[src]
Get the priority of the task
fn priority_mut(&mut self) -> Option<&mut TaskPriority>
[src]
Get the priority of the task mutable
fn project(&self) -> Option<&Project>
[src]
Get the project of the task
fn project_mut(&mut self) -> Option<&mut Project>
[src]
Get the project of the task mutable
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.
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
fn scheduled(&self) -> Option<&Date>
[src]
Get the scheduled date of the task
fn scheduled_mut(&mut self) -> Option<&mut Date>
[src]
Get the scheduled date of the task mutable
fn start(&self) -> Option<&Date>
[src]
Get the start date of the task
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
fn until(&self) -> Option<&Date>
[src]
Get the until date of the task
fn until_mut(&mut self) -> Option<&mut Date>
[src]
Get the until date of the task mutable
fn wait(&self) -> Option<&Date>
[src]
Get the wait date of the task
fn wait_mut(&mut self) -> Option<&mut Date>
[src]
Get the wait date of the task mutable