pub struct FilesystemAdapter { /* private fields */ }Expand description
Filesystem source adapter.
Recursively walks a root directory, applying extension and glob filters during enumeration. Fetches file content and computes blake3 hashes.
Implementations§
Source§impl FilesystemAdapter
impl FilesystemAdapter
Sourcepub fn from_spec(
source_name: &str,
spec: &SourceSpec,
) -> Result<Self, ResolveError>
pub fn from_spec( source_name: &str, spec: &SourceSpec, ) -> Result<Self, ResolveError>
Create a new FilesystemAdapter from a SourceSpec.
§Errors
Returns ResolveError::UnknownAdapter if the spec is not a filesystem source.
Returns ResolveError::Io if a glob pattern is invalid.
Sourcepub fn from_fs_spec(
source_name: &str,
spec: &FilesystemSourceSpec,
) -> Result<Self, ResolveError>
pub fn from_fs_spec( source_name: &str, spec: &FilesystemSourceSpec, ) -> Result<Self, ResolveError>
Create a new FilesystemAdapter directly from a FilesystemSourceSpec.
§Errors
Returns ResolveError::Io if a glob pattern is invalid.
Trait Implementations§
Source§impl Debug for FilesystemAdapter
impl Debug for FilesystemAdapter
Source§impl SourceAdapter for FilesystemAdapter
impl SourceAdapter for FilesystemAdapter
Source§fn source_kind(&self) -> &str
fn source_kind(&self) -> &str
Human-readable name of the source type (e.g., “Google Drive”).
Source§fn enumerate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SourceItem>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enumerate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SourceItem>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enumerate items available from this source.
Returns lightweight descriptors (no content) for filtering and
hash comparison. This is the “what’s there?” step. Read more
Source§fn fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 SourceItem,
) -> Pin<Box<dyn Future<Output = Result<ExtractedDocument, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 SourceItem,
) -> Pin<Box<dyn Future<Output = Result<ExtractedDocument, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the full content of a single item.
Separate from
enumerate() because fetching is expensive and we
want to skip unchanged items before paying this cost.Auto Trait Implementations§
impl Freeze for FilesystemAdapter
impl RefUnwindSafe for FilesystemAdapter
impl Send for FilesystemAdapter
impl Sync for FilesystemAdapter
impl Unpin for FilesystemAdapter
impl UnsafeUnpin for FilesystemAdapter
impl UnwindSafe for FilesystemAdapter
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