[][src]Struct taskchampion::Task

pub struct Task { /* fields omitted */ }

A task, as publicly exposed by this crate.

Note that Task objects represent a snapshot of the task at a moment in time, and are not protected by the atomicity of the backend storage. Concurrent modifications are safe, but a Task that is cached for more than a few seconds may cause the user to see stale data. Fetch, use, and drop Tasks quickly.

This struct contains only getters for various values on the task. The into_mut method returns a TaskMut which can be used to modify the task.

Implementations

impl Task[src]

pub fn get_uuid(&self) -> Uuid[src]

pub fn get_taskmap(&self) -> &TaskMap[src]

pub fn into_mut(self, replica: &mut Replica) -> TaskMut<'_>[src]

Prepare to mutate this task, requiring a mutable Replica in order to update the data it contains.

pub fn get_status(&self) -> Status[src]

pub fn get_description(&self) -> &str[src]

pub fn is_active(&self) -> bool[src]

Determine whether this task is active -- that is, that it has been started and not stopped.

pub fn has_tag(&self, tag: &Tag) -> bool[src]

Check if this task has the given tag

pub fn get_tags(&self) -> impl Iterator<Item = Tag> + '_[src]

Iterate over the task's tags

pub fn get_modified(&self) -> Option<DateTime<Utc>>[src]

Trait Implementations

impl Clone for Task[src]

impl Debug for Task[src]

impl PartialEq<Task> for Task[src]

impl StructuralPartialEq for Task[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,