Skip to main content

BatchExporter

Trait BatchExporter 

Source
pub trait BatchExporter: Send + Sync {
    // Required method
    fn export<'a>(
        &'a self,
        batch: &'a [AggregatedUsage],
    ) -> Pin<Box<dyn Future<Output = Result<(), ExportError>> + Send + 'a>>;

    // Provided method
    fn retry_policy(&self) -> RetryPolicy { ... }
}
Expand description

Exports a prepared batch away from the request path.

Required Methods§

Source

fn export<'a>( &'a self, batch: &'a [AggregatedUsage], ) -> Pin<Box<dyn Future<Output = Result<(), ExportError>> + Send + 'a>>

Export every aggregate in batch.

Retrying the same batch must be safe because identifiers are stable.

Provided Methods§

Source

fn retry_policy(&self) -> RetryPolicy

Ordering required after a failed or cancelled export.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§