pub struct ThreadService<A: CodeAnalyzer<D>, D: Doc + Send + Sync> { /* private fields */ }Expand description
Main entry point for Thread services.
The Facade pattern is used here to provide a simplified interface to a complex subsystem (the CocoIndex dataflow engine and storage backend).
Implementations§
Source§impl<A: CodeAnalyzer<D>, D: Doc + Send + Sync> ThreadService<A, D>
impl<A: CodeAnalyzer<D>, D: Doc + Send + Sync> ThreadService<A, D>
pub fn new(analyzer: Arc<A>) -> Self
Sourcepub async fn analyze_path(
&self,
_path: &Path,
) -> ServiceResult<Vec<ParsedDocument<D>>>
pub async fn analyze_path( &self, _path: &Path, ) -> ServiceResult<Vec<ParsedDocument<D>>>
Analyze a single file or directory path.
This method orchestrates the analysis process:
- Discovers files (if path is directory)
- Parses and analyzes code
- Stores results (if storage is configured)
Auto Trait Implementations§
impl<A, D> Freeze for ThreadService<A, D>
impl<A, D> RefUnwindSafe for ThreadService<A, D>where
D: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, D> Send for ThreadService<A, D>
impl<A, D> Sync for ThreadService<A, D>
impl<A, D> Unpin for ThreadService<A, D>where
D: Unpin,
impl<A, D> UnsafeUnpin for ThreadService<A, D>
impl<A, D> UnwindSafe for ThreadService<A, D>where
A: RefUnwindSafe,
D: UnwindSafe,
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