pub struct FileSource { /* private fields */ }Expand description
Generic filesystem-backed source with configurable taxonomy and section mapping.
Implementations§
Source§impl FileSource
impl FileSource
Sourcepub fn new(config: FileSourceConfig) -> Self
pub fn new(config: FileSourceConfig) -> Self
Create a generic file source from configuration.
Trait Implementations§
Source§impl DataSource for FileSource
impl DataSource for FileSource
Source§fn id(&self) -> &str
fn id(&self) -> &str
Stable source identifier used in records, metrics, and persistence state.
Source§fn refresh(
&self,
config: &SamplerConfig,
cursor: Option<&SourceCursor>,
limit: Option<usize>,
) -> Result<SourceSnapshot, SamplerError>
fn refresh( &self, config: &SamplerConfig, cursor: Option<&SourceCursor>, limit: Option<usize>, ) -> Result<SourceSnapshot, SamplerError>
Source§fn reported_record_count(
&self,
config: &SamplerConfig,
) -> Result<u128, SamplerError>
fn reported_record_count( &self, config: &SamplerConfig, ) -> Result<u128, SamplerError>
Exact metadata record count reported by the source. Read more
Source§fn default_triplet_recipes(&self) -> Vec<TripletRecipe>
fn default_triplet_recipes(&self) -> Vec<TripletRecipe>
Optional source-provided default triplet recipes. Read more
Auto Trait Implementations§
impl Freeze for FileSource
impl !RefUnwindSafe for FileSource
impl Send for FileSource
impl Sync for FileSource
impl Unpin for FileSource
impl UnsafeUnpin for FileSource
impl !UnwindSafe for FileSource
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 more