pub struct Task {Show 17 fields
pub uuid: String,
pub status: String,
pub write_pending: bool,
pub id: i32,
pub deleted: bool,
pub summary: String,
pub notes: String,
pub tags: Vec<String>,
pub project: String,
pub priority: String,
pub delegated_to: String,
pub subtasks: Vec<SubTask>,
pub dependencies: Vec<String>,
pub created: DateTime<Utc>,
pub resolved: Option<DateTime<Utc>>,
pub due: Option<DateTime<Utc>>,
pub filtered: bool,
}Fields§
§uuid: String§status: String§write_pending: bool§id: i32§deleted: bool§summary: String§notes: String§project: String§priority: String§delegated_to: String§subtasks: Vec<SubTask>§dependencies: Vec<String>§created: DateTime<Utc>§resolved: Option<DateTime<Utc>>§due: Option<DateTime<Utc>>§filtered: boolImplementations§
Source§impl Task
impl Task
Sourcepub fn equals(&self, other: &Task) -> bool
pub fn equals(&self, other: &Task) -> bool
Checks equality of core properties (ignores ephemeral fields)
Sourcepub fn matches_filter(&self, query: &Query) -> bool
pub fn matches_filter(&self, query: &Query) -> bool
Checks if task matches a filter query
Sourcepub fn long_summary(&self) -> String
pub fn long_summary(&self) -> String
Returns summary with last note if available
Sourcepub fn save_to_disk(&mut self, repo_path: &Path) -> Result<()>
pub fn save_to_disk(&mut self, repo_path: &Path) -> Result<()>
Saves task to disk
Sourcepub fn delete_from_disk(&self, repo_path: &Path) -> Result<()>
pub fn delete_from_disk(&self, repo_path: &Path) -> Result<()>
Deletes task from disk
Sourcepub fn parse_due_date_to_str(&self) -> String
pub fn parse_due_date_to_str(&self) -> String
Parses due date to a display string
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more