CompressorStats

Trait CompressorStats 

Source
pub trait CompressorStats: Debug + Clone {
    type ArrayVTable: VTable;

    // Required methods
    fn generate_opts(
        input: &<Self::ArrayVTable as VTable>::Array,
        opts: GenerateStatsOptions,
    ) -> Self;
    fn source(&self) -> &<Self::ArrayVTable as VTable>::Array;
    fn sample_opts(
        &self,
        sample_size: u32,
        sample_count: u32,
        opts: GenerateStatsOptions,
    ) -> Self;

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

Stats for the compressor.

Required Associated Types§

Source

type ArrayVTable: VTable

The type of the underlying source array vtable.

Required Methods§

Source

fn generate_opts( input: &<Self::ArrayVTable as VTable>::Array, opts: GenerateStatsOptions, ) -> Self

Generates stats with provided options.

Source

fn source(&self) -> &<Self::ArrayVTable as VTable>::Array

Returns the underlying source array that statistics were generated from.

Source

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

Sample the array with provided options.

Provided Methods§

Source

fn generate(input: &<Self::ArrayVTable as VTable>::Array) -> Self

Generates stats with default options.

Source

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

Sample the array with default options.

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§