pub struct DictionaryBuilder { /* private fields */ }Expand description
Builder for creating dictionary encodings.
Implementations§
Source§impl DictionaryBuilder
impl DictionaryBuilder
Sourcepub fn with_capacity(value_capacity: usize, dictionary_capacity: usize) -> Self
pub fn with_capacity(value_capacity: usize, dictionary_capacity: usize) -> Self
Creates a new dictionary builder with estimated capacity.
Sourcepub fn add(&mut self, value: &str) -> u32
pub fn add(&mut self, value: &str) -> u32
Adds a string value to the encoding.
Returns the code assigned to this value.
Sourcepub fn dictionary_size(&self) -> usize
pub fn dictionary_size(&self) -> usize
Returns the current dictionary size.
Sourcepub fn build(self) -> DictionaryEncoding
pub fn build(self) -> DictionaryEncoding
Builds the dictionary encoding.
Trait Implementations§
Source§impl Debug for DictionaryBuilder
impl Debug for DictionaryBuilder
Auto Trait Implementations§
impl Freeze for DictionaryBuilder
impl RefUnwindSafe for DictionaryBuilder
impl Send for DictionaryBuilder
impl Sync for DictionaryBuilder
impl Unpin for DictionaryBuilder
impl UnwindSafe for DictionaryBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more