MCPcopy Create free account
hub / github.com/beling/bsuccinct-rs / BuildCoding

Interface BuildCoding

csf/src/coding/mod.rs:165–179  ·  view source on GitHub ↗

Coding builder.

Source from the content-addressed store, hash-verified

163
164/// Coding builder.
165pub trait BuildCoding<V> {
166 /// Type of coding that `self` builds.
167 type Coding: Coding<Value=V>;
168
169 /// Returns the name of `self`.
170 ///
171 /// The name can be used by some cache systems to check
172 /// if coding built by `self` is already in cache.
173 fn name(&self) -> String;
174
175 /// Build coding that uses given number of `bits_per_fragment` and is optimal for data provided by `iter`.
176 /// If `bits_per_fragment` is 0, it is set automatically.
177 fn build_from_iter<Iter>(&self, iter: Iter, bits_per_fragment: u8) -> Self::Coding
178 where Iter: IntoIterator, Iter::Item: Borrow<<Self::Coding as Coding>::Value>;
179}
180
181// Returns `fragment_nr`-th `bits_per_fragment`-bits fragment of `bits`.
182/*#[inline(always)] pub fn get_u32_fragment(bits: u32, bits_per_fragment: u8, fragment_nr: u8) -> u32 {

Callers

nothing calls this directly

Implementers 2

mr.rscsf/src/coding/mr.rs
geom.rscsf/src/coding/geom.rs

Calls

no outgoing calls

Tested by

no test coverage detected