Skip to main content

HarvestEvent

Enum HarvestEvent 

Source
pub enum HarvestEvent<'a> {
Show 14 variants BatchStarted { total_portals: usize, }, PortalStarted { portal_index: usize, total_portals: usize, portal_name: &'a str, portal_url: &'a str, }, ExistingDatasetsFound { count: usize, }, PortalDatasetsFound { count: usize, }, DatasetProcessed { current: usize, total: usize, created: usize, updated: usize, unchanged: usize, failed: usize, skipped: usize, }, PortalCompleted { portal_index: usize, total_portals: usize, portal_name: &'a str, stats: &'a SyncStats, }, PortalFailed { portal_index: usize, total_portals: usize, portal_name: &'a str, error: &'a str, }, BatchCompleted { summary: &'a BatchHarvestSummary, }, PortalCancelled { portal_index: usize, total_portals: usize, portal_name: &'a str, stats: &'a SyncStats, }, BatchCancelled { completed_portals: usize, total_portals: usize, }, StaleDetected { count: usize, }, CircuitBreakerOpen { service: &'a str, retry_after: Duration, }, PreprocessingStarted { total: usize, }, PreprocessingCompleted { changed: usize, unchanged: usize, failed: usize, },
}
Expand description

Events emitted during harvesting operations.

These events provide fine-grained progress information that consumers can use for logging, UI updates, or metrics collection.

Variants§

§

BatchStarted

Batch harvest starting.

Fields

§total_portals: usize

Total number of portals to harvest.

§

PortalStarted

Single portal harvest starting.

Fields

§portal_index: usize

Zero-based index of the current portal.

§total_portals: usize

Total number of portals in batch.

§portal_name: &'a str

Portal name identifier.

§portal_url: &'a str

Portal URL.

§

ExistingDatasetsFound

Found existing datasets in database for portal.

Fields

§count: usize

Number of existing datasets.

§

PortalDatasetsFound

Found datasets on the portal.

Fields

§count: usize

Number of datasets found.

§

DatasetProcessed

Progress update during dataset processing.

Fields

§current: usize

Number of datasets processed so far.

§total: usize

Total number of datasets to process.

§created: usize

Counts by outcome type.

§updated: usize

Number of updated datasets.

§unchanged: usize

Number of unchanged datasets.

§failed: usize

Number of failed datasets.

§skipped: usize

Number of datasets skipped due to circuit breaker.

§

PortalCompleted

Single portal harvest completed successfully.

Fields

§portal_index: usize

Zero-based index of the current portal.

§total_portals: usize

Total number of portals in batch.

§portal_name: &'a str

Portal name identifier.

§stats: &'a SyncStats

Final statistics.

§

PortalFailed

Single portal harvest failed.

Fields

§portal_index: usize

Zero-based index of the current portal.

§total_portals: usize

Total number of portals in batch.

§portal_name: &'a str

Portal name identifier.

§error: &'a str

Error description.

§

BatchCompleted

Batch harvest completed.

Fields

§summary: &'a BatchHarvestSummary

Aggregated summary of all portal results.

§

PortalCancelled

Single portal harvest was cancelled.

Fields

§portal_index: usize

Zero-based index of the current portal.

§total_portals: usize

Total number of portals in batch.

§portal_name: &'a str

Portal name identifier.

§stats: &'a SyncStats

Partial statistics at cancellation time.

§

BatchCancelled

Batch harvest was cancelled.

Fields

§completed_portals: usize

Number of portals completed before cancellation.

§total_portals: usize

Total number of portals in batch.

§

StaleDetected

Datasets marked as stale after a successful full sync.

Fields

§count: usize

Number of datasets newly marked as stale.

§

CircuitBreakerOpen

Circuit breaker is open, harvest pausing/failing.

Fields

§service: &'a str

Service name.

§retry_after: Duration

Time until recovery attempt.

§

PreprocessingStarted

Pre-processing phase (delta detection / hash check) starting.

Fields

§total: usize

Total number of datasets to pre-process.

§

PreprocessingCompleted

Pre-processing phase completed — summary before finalization steps (stale detection).

Note: in the streaming pipeline, preprocessing and persistence are interleaved, so this fires after both have completed.

Fields

§changed: usize

Number of datasets that need persistence (created + updated).

§unchanged: usize

Number of datasets with identical content hash.

§failed: usize

Number of datasets that failed pre-processing.

Trait Implementations§

Source§

impl<'a> Clone for HarvestEvent<'a>

Source§

fn clone(&self) -> HarvestEvent<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for HarvestEvent<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for HarvestEvent<'a>

§

impl<'a> RefUnwindSafe for HarvestEvent<'a>

§

impl<'a> Send for HarvestEvent<'a>

§

impl<'a> Sync for HarvestEvent<'a>

§

impl<'a> Unpin for HarvestEvent<'a>

§

impl<'a> UnsafeUnpin for HarvestEvent<'a>

§

impl<'a> UnwindSafe for HarvestEvent<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,