Struct TaskBuilder

Source
pub struct TaskBuilder<Version: TaskWarriorVersion + 'static> { /* private fields */ }
Expand description

Builder for Task.

Implementations§

Source§

impl<Version: TaskWarriorVersion + 'static + Clone> TaskBuilder<Version>

Source

pub fn id<VALUE: Into<Option<u64>>>(&mut self, value: VALUE) -> &mut Self

The temporary assigned task id

Source

pub fn status<VALUE: Into<TaskStatus>>(&mut self, value: VALUE) -> &mut Self

The status of the task

Source

pub fn uuid<VALUE: Into<Uuid>>(&mut self, value: VALUE) -> &mut Self

The uuid which identifies the task and is important for syncing

Source

pub fn entry<VALUE: Into<Date>>(&mut self, value: VALUE) -> &mut Self

The entry date, when this task was created

Source

pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The description of the task (i.e. its main content) This field is the only mandatory field, when using the TaskBuilder.

Source

pub fn annotations<VALUE: Into<Option<Vec<Annotation>>>>( &mut self, value: VALUE, ) -> &mut Self

A list of annotations with timestamps

Source

pub fn depends<VALUE: Into<Option<Vec<Uuid>>>>( &mut self, value: VALUE, ) -> &mut Self

The uuids of other tasks which have to be completed before this one becomes unblocked.

Source

pub fn due<VALUE: Into<Option<Date>>>(&mut self, value: VALUE) -> &mut Self

The due date of the task

Source

pub fn end<VALUE: Into<Option<Date>>>(&mut self, value: VALUE) -> &mut Self

When the task was last deleted or completed

Source

pub fn imask<VALUE: Into<Option<f64>>>(&mut self, value: VALUE) -> &mut Self

The imask is used internally for recurrence

Source

pub fn mask<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self

The mask is used internally for recurrence

Source

pub fn modified<VALUE: Into<Option<Date>>>(&mut self, value: VALUE) -> &mut Self

When the task was last modified

Source

pub fn parent<VALUE: Into<Option<Uuid>>>(&mut self, value: VALUE) -> &mut Self

A task can have a parent task

Source

pub fn priority<VALUE: Into<Option<TaskPriority>>>( &mut self, value: VALUE, ) -> &mut Self

The priority of the task

Source

pub fn project<VALUE: Into<Option<Project>>>( &mut self, value: VALUE, ) -> &mut Self

A task can be part of a project. Typically of the form “project.subproject.subsubproject”

Source

pub fn recur<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self

The timespan after which this task should recur

Source

pub fn scheduled<VALUE: Into<Option<Date>>>( &mut self, value: VALUE, ) -> &mut Self

When the task becomes ready

Source

pub fn start<VALUE: Into<Option<Date>>>(&mut self, value: VALUE) -> &mut Self

When the task becomes active

Source

pub fn tags<VALUE: Into<Option<Vec<Tag>>>>(&mut self, value: VALUE) -> &mut Self

The tags associated with the task

Source

pub fn until<VALUE: Into<Option<Date>>>(&mut self, value: VALUE) -> &mut Self

When the recurrence stops

Source

pub fn wait<VALUE: Into<Option<Date>>>(&mut self, value: VALUE) -> &mut Self

This hides the task until the wait date

Source

pub fn urgency<VALUE: Into<Option<Urgency>>>( &mut self, value: VALUE, ) -> &mut Self

This contains the urgency of the task

Source

pub fn uda<VALUE: Into<UDA>>(&mut self, value: VALUE) -> &mut Self

A map of user defined attributes

Source

pub fn build(&self) -> Result<Task<Version>, TaskBuilderError>

Builds a new Task.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl<Version: Clone + TaskWarriorVersion + 'static> Clone for TaskBuilder<Version>

Source§

fn clone(&self) -> TaskBuilder<Version>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Version: TaskWarriorVersion + 'static + Clone> Default for TaskBuilder<Version>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<Version> Freeze for TaskBuilder<Version>

§

impl<Version> RefUnwindSafe for TaskBuilder<Version>
where Version: RefUnwindSafe,

§

impl<Version> Send for TaskBuilder<Version>
where Version: Send,

§

impl<Version> Sync for TaskBuilder<Version>
where Version: Sync,

§

impl<Version> Unpin for TaskBuilder<Version>
where Version: Unpin,

§

impl<Version> UnwindSafe for TaskBuilder<Version>
where Version: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.