Skip to main content

PipelineCompressionStrategy

Trait PipelineCompressionStrategy 

Source
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§

Source

type Stage: CompressionStrategy

The type representing a compression stage

Required Methods§

Source

fn add_stage(&mut self, stage: Self::Stage) -> Result<(), Self::Error>

Add a stage to the compression pipeline

Source

fn remove_stage(&mut self, index: usize) -> Result<Self::Stage, Self::Error>

Remove a stage from the pipeline

Source

fn stage_count(&self) -> usize

Get the number of stages in the pipeline

Source

fn stage_stats(&self) -> Vec<CompressionStats>

Get statistics for each stage

Source

fn set_stage_enabled( &mut self, index: usize, enabled: bool, ) -> Result<(), Self::Error>

Enable or disable a specific stage

Implementors§