pub struct ScrapService<'a> { /* private fields */ }Implementations§
Source§impl<'a> ScrapService<'a>
impl<'a> ScrapService<'a>
pub fn new(db: &'a Database) -> Self
pub fn add_scrap(&self, task_id: i64, content: &str) -> Result<Scrap>
pub fn get_scrap(&self, scrap_id: i64) -> Result<Scrap>
pub fn list_scraps(&self, task_id: i64) -> Result<Vec<Scrap>>
Sourcepub fn copy_linked_scraps(
&self,
from_task_id: i64,
to_task_id: i64,
todo_mapping: &HashMap<i64, i64>,
) -> Result<()>
pub fn copy_linked_scraps( &self, from_task_id: i64, to_task_id: i64, todo_mapping: &HashMap<i64, i64>, ) -> Result<()>
Copies scraps that are linked to inherited todos.
§Arguments
from_task_id- The task ID to copy fromto_task_id- The task ID to copy totodo_mapping- HashMap mapping old todo task_index to new todo task_index
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ScrapService<'a>
impl<'a> !Send for ScrapService<'a>
impl<'a> !Sync for ScrapService<'a>
impl<'a> !UnwindSafe for ScrapService<'a>
impl<'a> Freeze for ScrapService<'a>
impl<'a> Unpin for ScrapService<'a>
impl<'a> UnsafeUnpin for ScrapService<'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