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§
Sourcefn process_chunks_monitored<F, R>(
&self,
params: AdaptiveChunkingParams,
f: F,
) -> CoreResult<(Vec<R>, ChunkProcessingStats)>
fn process_chunks_monitored<F, R>( &self, params: AdaptiveChunkingParams, f: F, ) -> CoreResult<(Vec<R>, ChunkProcessingStats)>
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.
Sourcefn create_adjuster(
&self,
params: &AdaptiveChunkingParams,
) -> CoreResult<DynamicChunkAdjuster>
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", so this trait is not object safe.