ProcessingObserver

Trait ProcessingObserver 

Source
pub trait ProcessingObserver: Send + Sync {
    // Provided methods
    fn on_chunk_started<'life0, 'async_trait>(
        &'life0 self,
        _chunk_id: u64,
        _size: usize,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_chunk_completed<'life0, 'async_trait>(
        &'life0 self,
        _chunk_id: u64,
        _duration: Duration,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_progress_update<'life0, 'async_trait>(
        &'life0 self,
        _bytes_processed: u64,
        _total_bytes: u64,
        _throughput_mbps: f64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_processing_started<'life0, 'async_trait>(
        &'life0 self,
        _total_bytes: u64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_processing_completed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _total_duration: Duration,
        _final_metrics: Option<&'life1 ProcessingMetrics>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Observer trait for pipeline processing events

This trait defines the interface for observing pipeline processing events, enabling real-time monitoring, progress tracking, and event handling during pipeline execution.

§Key Features

  • Event Notifications: Receive notifications for various pipeline events
  • Progress Monitoring: Track processing progress in real-time
  • Performance Metrics: Access detailed performance metrics
  • Error Handling: Handle processing errors and failures
  • Lifecycle Management: Monitor pipeline lifecycle events

§Event Types

  • Chunk Events: Individual chunk processing start/completion
  • Progress Events: Periodic progress updates with throughput
  • Lifecycle Events: Pipeline start/completion events
  • Error Events: Processing errors and failure notifications

§Examples

Provided Methods§

Source

fn on_chunk_started<'life0, 'async_trait>( &'life0 self, _chunk_id: u64, _size: usize, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called when a chunk starts processing

Source

fn on_chunk_completed<'life0, 'async_trait>( &'life0 self, _chunk_id: u64, _duration: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called when a chunk completes processing

Source

fn on_progress_update<'life0, 'async_trait>( &'life0 self, _bytes_processed: u64, _total_bytes: u64, _throughput_mbps: f64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called periodically with progress updates

Source

fn on_processing_started<'life0, 'async_trait>( &'life0 self, _total_bytes: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called when processing starts

Source

fn on_processing_completed<'life0, 'life1, 'async_trait>( &'life0 self, _total_duration: Duration, _final_metrics: Option<&'life1 ProcessingMetrics>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when processing completes

Implementors§