pub struct ProviderAdapter {
pub discovery: Box<dyn LogDiscovery>,
pub parser: Box<dyn SessionParser>,
pub mapper: Box<dyn ToolMapper>,
}Expand description
Adapter that bundles the three trait implementations
This provides a unified interface for working with provider functionality while maintaining clean separation of concerns internally.
Fields§
§discovery: Box<dyn LogDiscovery>§parser: Box<dyn SessionParser>§mapper: Box<dyn ToolMapper>Implementations§
Source§impl ProviderAdapter
impl ProviderAdapter
pub fn new( discovery: Box<dyn LogDiscovery>, parser: Box<dyn SessionParser>, mapper: Box<dyn ToolMapper>, ) -> Self
Sourcepub fn process_file(&self, path: &Path) -> Result<Vec<AgentEvent>>
pub fn process_file(&self, path: &Path) -> Result<Vec<AgentEvent>>
Process a file through the adapter (convenience method)
Source§impl ProviderAdapter
impl ProviderAdapter
Sourcepub fn scan_legacy(
&self,
log_root: &Path,
context: &ScanContext,
) -> Result<Vec<SessionMetadata>>
pub fn scan_legacy( &self, log_root: &Path, context: &ScanContext, ) -> Result<Vec<SessionMetadata>>
Legacy support: Scan sessions and convert to full SessionMetadata
This bridges the gap between the new efficient SessionIndex and the old UI-heavy SessionMetadata. The new discovery layer provides lightweight SessionIndex, and this method enriches it with file metadata for backward compatibility with existing UI code.
Auto Trait Implementations§
impl Freeze for ProviderAdapter
impl !RefUnwindSafe for ProviderAdapter
impl Send for ProviderAdapter
impl Sync for ProviderAdapter
impl Unpin for ProviderAdapter
impl !UnwindSafe for ProviderAdapter
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