pub struct ProjectContextEngine { /* private fields */ }Expand description
Engine for discovering and ingesting project context
Implementations§
Source§impl ProjectContextEngine
impl ProjectContextEngine
Sourcepub fn with_config(config: ProjectContextConfig) -> Self
pub fn with_config(config: ProjectContextConfig) -> Self
Create a new engine with custom config
Sourcepub fn scan_directory(&self, path: &Path) -> Result<Vec<DiscoveredFile>>
pub fn scan_directory(&self, path: &Path) -> Result<Vec<DiscoveredFile>>
Scan a directory for instruction files Scan a directory for instruction files Returns (discovered_files, skipped_count)
Sourcepub fn scan_directory_with_stats(
&self,
path: &Path,
) -> Result<(Vec<DiscoveredFile>, usize)>
pub fn scan_directory_with_stats( &self, path: &Path, ) -> Result<(Vec<DiscoveredFile>, usize)>
Scan a directory for instruction files with statistics Returns (discovered_files, skipped_count)
Sourcepub fn parse_file(&self, file: &DiscoveredFile) -> Result<ParsedInstructions>
pub fn parse_file(&self, file: &DiscoveredFile) -> Result<ParsedInstructions>
Parse a discovered file into instructions
Sourcepub fn file_to_memory(&self, file: &DiscoveredFile) -> Memory
pub fn file_to_memory(&self, file: &DiscoveredFile) -> Memory
Convert a discovered file to a parent memory
Sourcepub fn section_to_memory(
&self,
section: &ParsedSection,
file: &DiscoveredFile,
parent_id: i64,
) -> Memory
pub fn section_to_memory( &self, section: &ParsedSection, file: &DiscoveredFile, parent_id: i64, ) -> Memory
Convert a parsed section to a child memory
Sourcepub fn config(&self) -> &ProjectContextConfig
pub fn config(&self) -> &ProjectContextConfig
Get config reference
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProjectContextEngine
impl RefUnwindSafe for ProjectContextEngine
impl Send for ProjectContextEngine
impl Sync for ProjectContextEngine
impl Unpin for ProjectContextEngine
impl UnsafeUnpin for ProjectContextEngine
impl UnwindSafe for ProjectContextEngine
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.