pub trait PipelineCompressionStrategy: CompressionStrategy {
type Stage: CompressionStrategy;
// Required methods
fn add_stage(&mut self, stage: Self::Stage) -> Result<(), Self::Error>;
fn remove_stage(&mut self, index: usize) -> Result<Self::Stage, Self::Error>;
fn stage_count(&self) -> usize;
fn stage_stats(&self) -> Vec<CompressionStats>;
fn set_stage_enabled(
&mut self,
index: usize,
enabled: bool,
) -> Result<(), Self::Error>;
}Expand description
A trait for multi-stage compression pipelines
Required Associated Types§
Sourcetype Stage: CompressionStrategy
type Stage: CompressionStrategy
The type representing a compression stage
Required Methods§
Sourcefn add_stage(&mut self, stage: Self::Stage) -> Result<(), Self::Error>
fn add_stage(&mut self, stage: Self::Stage) -> Result<(), Self::Error>
Add a stage to the compression pipeline
Sourcefn remove_stage(&mut self, index: usize) -> Result<Self::Stage, Self::Error>
fn remove_stage(&mut self, index: usize) -> Result<Self::Stage, Self::Error>
Remove a stage from the pipeline
Sourcefn stage_count(&self) -> usize
fn stage_count(&self) -> usize
Get the number of stages in the pipeline
Sourcefn stage_stats(&self) -> Vec<CompressionStats>
fn stage_stats(&self) -> Vec<CompressionStats>
Get statistics for each stage