Trait csf::coding::BuildCoding

source ·
pub trait BuildCoding<V> {
    type Coding: Coding<Value = V>;

    // Required methods
    fn name(&self) -> String;
    fn build_from_iter<Iter>(
        &self,
        iter: Iter,
        bits_per_fragment: u8
    ) -> Self::Coding
       where Iter: IntoIterator,
             Iter::Item: Borrow<<Self::Coding as Coding>::Value>;
}
Expand description

Coding builder.

Required Associated Types§

source

type Coding: Coding<Value = V>

Type of coding that self builds.

Required Methods§

source

fn name(&self) -> String

Returns the name of self.

The name can be used by some cache systems to check if coding built by self is already in cache.

source

fn build_from_iter<Iter>( &self, iter: Iter, bits_per_fragment: u8 ) -> Self::Codingwhere Iter: IntoIterator, Iter::Item: Borrow<<Self::Coding as Coding>::Value>,

Build coding that uses given number of bits_per_fragment and is optimal for data provided by iter. If bits_per_fragment is 0, it is set automatically.

Implementors§