pub struct DataPipeline { /* private fields */ }Expand description
Data pipeline for async processing
Implementations§
Source§impl DataPipeline
impl DataPipeline
Sourcepub fn with_capacity(self, capacity: usize) -> Self
pub fn with_capacity(self, capacity: usize) -> Self
Set cache capacity
Sourcepub fn with_loader<F>(self, loader: F) -> Self
pub fn with_loader<F>(self, loader: F) -> Self
Set custom data loader
Sourcepub async fn process(&self, source_id: &str) -> Result<DataSource, DataError>
pub async fn process(&self, source_id: &str) -> Result<DataSource, DataError>
Process a data source (with caching)
Sourcepub async fn process_batch(
&self,
source_ids: &[String],
) -> Vec<Result<DataSource, DataError>>
pub async fn process_batch( &self, source_ids: &[String], ) -> Vec<Result<DataSource, DataError>>
Process multiple sources
Sourcepub fn cache_stats(&self) -> &CacheStats
pub fn cache_stats(&self) -> &CacheStats
Get cache statistics
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear cache
Sourcepub fn invalidate(&self, source_id: &str)
pub fn invalidate(&self, source_id: &str)
Invalidate specific cache entry
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DataPipeline
impl !RefUnwindSafe for DataPipeline
impl Send for DataPipeline
impl Sync for DataPipeline
impl Unpin for DataPipeline
impl UnsafeUnpin for DataPipeline
impl !UnwindSafe for DataPipeline
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