pub struct ArchiveService { /* private fields */ }
Expand description
Service for archiving documents and managing the archived folder structure
Implementations§
Source§impl ArchiveService
impl ArchiveService
Sourcepub fn new<P: AsRef<Path>>(workspace_dir: P) -> Self
pub fn new<P: AsRef<Path>>(workspace_dir: P) -> Self
Create a new archive service for a workspace
Sourcepub async fn archive_document(&self, document_id: &str) -> Result<ArchiveResult>
pub async fn archive_document(&self, document_id: &str) -> Result<ArchiveResult>
Archive a document and all its children
Sourcepub async fn is_document_archived(&self, document_id: &str) -> Result<bool>
pub async fn is_document_archived(&self, document_id: &str) -> Result<bool>
Check if a document is already archived
Sourcepub async fn get_archived_documents(&self) -> Result<Vec<ArchivedDocument>>
pub async fn get_archived_documents(&self) -> Result<Vec<ArchivedDocument>>
Get all archived documents
Auto Trait Implementations§
impl Freeze for ArchiveService
impl RefUnwindSafe for ArchiveService
impl Send for ArchiveService
impl Sync for ArchiveService
impl Unpin for ArchiveService
impl UnwindSafe for ArchiveService
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
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more