pub struct LinkService<'a> { /* private fields */ }Implementations§
Source§impl<'a> LinkService<'a>
impl<'a> LinkService<'a>
pub fn new(db: &'a Database) -> Self
pub fn add_link( &self, task_id: i64, url: &str, title: Option<&str>, ) -> Result<Link>
pub fn get_link(&self, link_id: i64) -> Result<Link>
pub fn list_links(&self, task_id: i64) -> Result<Vec<Link>>
Sourcepub fn delete_link(&self, link_id: i64) -> Result<()>
pub fn delete_link(&self, link_id: i64) -> Result<()>
Delete a link by its ID
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LinkService<'a>
impl<'a> !Send for LinkService<'a>
impl<'a> !Sync for LinkService<'a>
impl<'a> !UnwindSafe for LinkService<'a>
impl<'a> Freeze for LinkService<'a>
impl<'a> Unpin for LinkService<'a>
impl<'a> UnsafeUnpin for LinkService<'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