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
Create a new Task instance
fn status(&self) -> &TaskStatus
Get the status of the task
fn uuid(&self) -> &Uuid
Get the uuid of the task
fn entry(&self) -> &Date
Get the entry date of the task
fn description(&self) -> &String
Get the description of the task
fn annotations(&self) -> Option<&Vec<Annotation>>
Get the annotations of the task
fn add_annotation(&mut self, an: Annotation)
Add an annotation to this task
fn add_annotations<I: Iterator<Item=Annotation>>(&mut self, i: I)
Add annotations to this task
fn depends(&self) -> Option<&String>
Get the depends of the task
This is exported as String by now, which might change in future
fn due(&self) -> Option<&Date>
Get the due date of the task
fn end(&self) -> Option<&Date>
Get the end date of the task
fn imask(&self) -> Option<&i64>
Get the imask of the task
fn mask(&self) -> Option<&String>
Get the mask of the task
fn modified(&self) -> Option<&Date>
Get the modified date of the task
fn parent(&self) -> Option<&Uuid>
Get the parent of the task
fn priority(&self) -> Option<&TaskPriority>
Get the priority of the task
fn project(&self) -> Option<&Project>
Get the project of the task
fn recur(&self) -> Option<&String>
Get the recur of the task
This is exported as String by now. This might change in future versions of this crate.
fn scheduled(&self) -> Option<&Date>
Get the scheduled date of the task
fn start(&self) -> Option<&Date>
Get the start date of the task
Get the tags of the task
fn until(&self) -> Option<&Date>
Get the until date of the task
fn wait(&self) -> Option<&Date>
Get the wait date of the task
Trait Implementations
impl Debug for Task
[src]
impl Clone for Task
[src]
fn clone(&self) -> Task
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Serialize for Task
[src]
fn serialize<S>(&self, serializer: &mut S) -> RResult<(), S::Error> where S: Serializer
Serializes this value into this serializer.
impl Deserialize for Task
[src]
fn deserialize<D>(deserializer: &mut D) -> RResult<Task, D::Error> where D: Deserializer
Deserialize this value given this Deserializer
.