pub trait DeltaDetector:
Send
+ Sync
+ Clone {
// Required method
fn needs_reprocessing(
&self,
existing_hash: Option<&Option<String>>,
new_hash: &str,
) -> ReprocessingDecision;
}Expand description
Trait for delta detection strategies.
Implementations determine whether a dataset needs reprocessing based on its existing and new content hashes. This enables different strategies such as content-hash comparison, always-reprocess, or timestamp-based detection.
Required Methods§
Sourcefn needs_reprocessing(
&self,
existing_hash: Option<&Option<String>>,
new_hash: &str,
) -> ReprocessingDecision
fn needs_reprocessing( &self, existing_hash: Option<&Option<String>>, new_hash: &str, ) -> ReprocessingDecision
Determines if a dataset needs reprocessing.
Implementations must only return Created, Updated, or Unchanged outcomes.
Failed and Skipped are reserved for runtime errors in the harvest pipeline.
§Arguments
existing_hash- The stored content hash lookup result:None— dataset not found in the store (new dataset)Some(None)— dataset exists but has no stored hash (legacy record)Some(Some(hash))— dataset exists with the given content hash
new_hash- The computed content hash from the portal data
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.