pub struct CreateTodayTaskUseCase<'a> { /* private fields */ }Expand description
Creates or reuses the daily “today” task with atomic todo/scrap inheritance.
Implementations§
Source§impl<'a> CreateTodayTaskUseCase<'a>
impl<'a> CreateTodayTaskUseCase<'a>
pub fn new(db: &'a Database) -> Self
Sourcepub fn get_or_create(&self) -> Result<Task>
pub fn get_or_create(&self) -> Result<Task>
Returns today’s task, creating it and inheriting pending work when needed.
Sourcepub fn create_with_inheritance(&self, task_name: &str) -> Result<Task>
pub fn create_with_inheritance(&self, task_name: &str) -> Result<Task>
Creates a today task and inherits pending todos/scraps inside one transaction.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CreateTodayTaskUseCase<'a>
impl<'a> !Send for CreateTodayTaskUseCase<'a>
impl<'a> !Sync for CreateTodayTaskUseCase<'a>
impl<'a> !UnwindSafe for CreateTodayTaskUseCase<'a>
impl<'a> Freeze for CreateTodayTaskUseCase<'a>
impl<'a> Unpin for CreateTodayTaskUseCase<'a>
impl<'a> UnsafeUnpin for CreateTodayTaskUseCase<'a>
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