pub struct ThingsStore {
pub tasks_by_uuid: HashMap<ThingsId, Task>,
pub areas_by_uuid: HashMap<ThingsId, Area>,
pub tags_by_uuid: HashMap<ThingsId, Tag>,
pub tags_by_title: HashMap<String, ThingsId>,
pub project_progress_by_uuid: HashMap<ThingsId, ProjectProgress>,
pub short_ids: HashMap<ThingsId, String>,
pub markable_ids: HashSet<ThingsId>,
pub markable_ids_sorted: Vec<ThingsId>,
pub area_ids_sorted: Vec<ThingsId>,
pub task_ids_sorted: Vec<ThingsId>,
}Fields§
§tasks_by_uuid: HashMap<ThingsId, Task>§areas_by_uuid: HashMap<ThingsId, Area>§project_progress_by_uuid: HashMap<ThingsId, ProjectProgress>§short_ids: HashMap<ThingsId, String>§markable_ids: HashSet<ThingsId>§markable_ids_sorted: Vec<ThingsId>§area_ids_sorted: Vec<ThingsId>§task_ids_sorted: Vec<ThingsId>Implementations§
Source§impl ThingsStore
impl ThingsStore
pub fn from_raw_state(raw_state: &RawState) -> Self
pub fn tasks( &self, status: Option<TaskStatus>, trashed: Option<bool>, item_type: Option<TaskType>, ) -> Vec<Task>
pub fn today(&self, today: &DateTime<Utc>) -> Vec<Task>
pub fn inbox(&self) -> Vec<Task>
pub fn anytime(&self, today: &DateTime<Utc>) -> Vec<Task>
pub fn someday(&self) -> Vec<Task>
pub fn logbook( &self, from_date: Option<DateTime<Local>>, to_date: Option<DateTime<Local>>, ) -> Vec<Task>
pub fn effective_project_uuid(&self, task: &Task) -> Option<ThingsId>
pub fn effective_area_uuid(&self, task: &Task) -> Option<ThingsId>
pub fn projects(&self, status: Option<TaskStatus>) -> Vec<Task>
pub fn areas(&self) -> Vec<Area>
pub fn get_task(&self, uuid: &str) -> Option<Task>
pub fn get_area(&self, uuid: &str) -> Option<Area>
pub fn get_tag(&self, uuid: &str) -> Option<Tag>
pub fn resolve_tag_title<T: ToString>(&self, uuid: T) -> String
pub fn resolve_area_title<T: ToString>(&self, uuid: T) -> String
pub fn resolve_project_title<T: ToString>(&self, uuid: T) -> String
pub fn short_id<T: ToString>(&self, uuid: T) -> String
pub fn project_progress<T: ToString>(&self, project_uuid: T) -> ProjectProgress
pub fn unique_prefix_length<T: ToString>(&self, ids: &[T]) -> usize
pub fn resolve_mark_identifier( &self, identifier: &str, ) -> (Option<Task>, String, Vec<Task>)
pub fn resolve_area_identifier( &self, identifier: &str, ) -> (Option<Area>, String, Vec<Area>)
pub fn resolve_task_identifier( &self, identifier: &str, ) -> (Option<Task>, String, Vec<Task>)
Trait Implementations§
Source§impl Debug for ThingsStore
impl Debug for ThingsStore
Source§impl Default for ThingsStore
impl Default for ThingsStore
Source§fn default() -> ThingsStore
fn default() -> ThingsStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ThingsStore
impl RefUnwindSafe for ThingsStore
impl Send for ThingsStore
impl Sync for ThingsStore
impl Unpin for ThingsStore
impl UnsafeUnpin for ThingsStore
impl UnwindSafe for ThingsStore
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