pub struct DocumentDiscoveryService { /* private fields */ }
Expand description
Service for discovering documents by ID across all document types
Implementations§
Source§impl DocumentDiscoveryService
impl DocumentDiscoveryService
Sourcepub fn new<P: AsRef<Path>>(workspace_dir: P) -> Self
pub fn new<P: AsRef<Path>>(workspace_dir: P) -> Self
Create a new document discovery service for a workspace
Sourcepub async fn find_document_by_id(
&self,
document_id: &str,
) -> Result<DocumentDiscoveryResult>
pub async fn find_document_by_id( &self, document_id: &str, ) -> Result<DocumentDiscoveryResult>
Find a document by its ID across all document types
Sourcepub async fn find_document_of_type(
&self,
document_id: &str,
doc_type: DocumentType,
) -> Result<PathBuf>
pub async fn find_document_of_type( &self, document_id: &str, doc_type: DocumentType, ) -> Result<PathBuf>
Find a document by its ID within a specific document type
Sourcepub async fn find_document_by_id_and_type(
&self,
document_id: &str,
doc_type: DocumentType,
) -> Result<PathBuf>
pub async fn find_document_by_id_and_type( &self, document_id: &str, doc_type: DocumentType, ) -> Result<PathBuf>
Find a document by its ID with a specific document type constraint
Sourcepub async fn document_exists(&self, document_id: &str) -> bool
pub async fn document_exists(&self, document_id: &str) -> bool
Check if a document with the given ID exists
Sourcepub async fn find_all_documents_of_type(
&self,
doc_type: DocumentType,
) -> Result<Vec<PathBuf>>
pub async fn find_all_documents_of_type( &self, doc_type: DocumentType, ) -> Result<Vec<PathBuf>>
Get all documents of a specific type
Auto Trait Implementations§
impl Freeze for DocumentDiscoveryService
impl RefUnwindSafe for DocumentDiscoveryService
impl Send for DocumentDiscoveryService
impl Sync for DocumentDiscoveryService
impl Unpin for DocumentDiscoveryService
impl UnwindSafe for DocumentDiscoveryService
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