Skip to main content

AdaptiveChunkingWithMonitoring

Trait AdaptiveChunkingWithMonitoring 

Source
pub trait AdaptiveChunkingWithMonitoring<A: Clone + Copy + 'static + Send + Sync>: AdaptiveChunking<A> {
    // Required methods
    fn process_chunks_monitored<F, R>(
        &self,
        params: AdaptiveChunkingParams,
        f: F,
    ) -> CoreResult<(Vec<R>, ChunkProcessingStats)>
       where F: Fn(&[A], usize) -> R;
    fn create_adjuster(
        &self,
        params: &AdaptiveChunkingParams,
    ) -> CoreResult<DynamicChunkAdjuster>;
}
Expand description

Extended trait for adaptive chunking with memory monitoring (v0.2.0).

Required Methods§

Source

fn process_chunks_monitored<F, R>( &self, params: AdaptiveChunkingParams, f: F, ) -> CoreResult<(Vec<R>, ChunkProcessingStats)>
where F: Fn(&[A], usize) -> R,

Process chunks with memory pressure monitoring and dynamic adjustment.

This method monitors memory pressure during processing and automatically adjusts chunk sizes to prevent OOM conditions.

Source

fn create_adjuster( &self, params: &AdaptiveChunkingParams, ) -> CoreResult<DynamicChunkAdjuster>

Create a dynamic chunk adjuster based on the params and array characteristics.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§