Trait CompressorStats

Source
pub trait CompressorStats: Debug + Clone {
    type ArrayType: Array;

    // Required methods
    fn generate_opts(
        input: &Self::ArrayType,
        opts: GenerateStatsOptions,
    ) -> Self;
    fn source(&self) -> &Self::ArrayType;
    fn sample_opts(
        &self,
        sample_size: u32,
        sample_count: u32,
        opts: GenerateStatsOptions,
    ) -> Self;

    // Provided methods
    fn generate(input: &Self::ArrayType) -> Self { ... }
    fn sample(&self, sample_size: u32, sample_count: u32) -> Self { ... }
}
Expand description

Stats for the compressor.

Required Associated Types§

Required Methods§

Source

fn generate_opts(input: &Self::ArrayType, opts: GenerateStatsOptions) -> Self

Source

fn source(&self) -> &Self::ArrayType

Source

fn sample_opts( &self, sample_size: u32, sample_count: u32, opts: GenerateStatsOptions, ) -> Self

Provided Methods§

Source

fn generate(input: &Self::ArrayType) -> Self

Source

fn sample(&self, sample_size: u32, sample_count: u32) -> Self

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.

Implementors§