pub struct DeduplicationPipeline<I>where
I: ScrapedItem,{ /* private fields */ }Expand description
Built-in pipelines that do not require extra feature flags. Pipeline that filters duplicate items based on a configurable field set.
Implementations§
Source§impl<I> DeduplicationPipeline<I>where
I: ScrapedItem,
impl<I> DeduplicationPipeline<I>where
I: ScrapedItem,
Sourcepub fn new<F, S>(unique_fields: F) -> DeduplicationPipeline<I>
pub fn new<F, S>(unique_fields: F) -> DeduplicationPipeline<I>
Creates a new DeduplicationPipeline with a specified set of unique fields.
Trait Implementations§
Source§impl<I> Pipeline<I> for DeduplicationPipeline<I>where
I: ScrapedItem,
impl<I> Pipeline<I> for DeduplicationPipeline<I>where
I: ScrapedItem,
Source§fn process_item<'life0, 'async_trait>(
&'life0 self,
item: I,
) -> Pin<Box<dyn Future<Output = Result<Option<I>, PipelineError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DeduplicationPipeline<I>: 'async_trait,
fn process_item<'life0, 'async_trait>(
&'life0 self,
item: I,
) -> Pin<Box<dyn Future<Output = Result<Option<I>, PipelineError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DeduplicationPipeline<I>: 'async_trait,
Processes a single scraped item. Read more
Source§fn get_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PipelineError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DeduplicationPipeline<I>: 'async_trait,
fn get_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PipelineError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DeduplicationPipeline<I>: 'async_trait,
Returns the current state of the pipeline as a JSON value. Read more
Source§fn restore_state<'life0, 'async_trait>(
&'life0 self,
state: Value,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DeduplicationPipeline<I>: 'async_trait,
fn restore_state<'life0, 'async_trait>(
&'life0 self,
state: Value,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DeduplicationPipeline<I>: 'async_trait,
Restores the pipeline’s state from a JSON value. Read more
Auto Trait Implementations§
impl<I> Freeze for DeduplicationPipeline<I>
impl<I> !RefUnwindSafe for DeduplicationPipeline<I>
impl<I> Send for DeduplicationPipeline<I>
impl<I> Sync for DeduplicationPipeline<I>
impl<I> Unpin for DeduplicationPipeline<I>where
I: Unpin,
impl<I> UnwindSafe for DeduplicationPipeline<I>where
I: UnwindSafe,
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