pub struct Book<K: Ord + Clone> { /* private fields */ }Expand description
A codebook used for encoding.
Implementations§
Source§impl<K: Ord + Clone> Book<K>
impl<K: Ord + Clone> Book<K>
Sourcepub fn into_inner(self) -> BTreeMap<K, BitVec>
pub fn into_inner(self) -> BTreeMap<K, BitVec>
Returns the underlying B-Tree.
Sourcepub fn iter(&self) -> Iter<'_, K, BitVec>
pub fn iter(&self) -> Iter<'_, K, BitVec>
An iterator over all symbol and code word pairs, sorted by symbol.
Sourcepub fn contains_symbol<Q>(&self, k: &Q) -> bool
pub fn contains_symbol<Q>(&self, k: &Q) -> bool
Returns true if the book contains the specified symbol.
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for Book<K>
impl<K> RefUnwindSafe for Book<K>where
K: RefUnwindSafe,
impl<K> Send for Book<K>where
K: Send,
impl<K> Sync for Book<K>where
K: Sync,
impl<K> Unpin for Book<K>
impl<K> UnwindSafe for Book<K>where
K: RefUnwindSafe,
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