Struct huffman_rust::CanonicalTree
source · Fields
bytes: u64
code_book: CodeBook
Implementations
sourceimpl CanonicalTree
impl CanonicalTree
pub fn new(bytes: u64, code_lengths: Vec<(u8, u8)>) -> CanonicalTree
pub fn from_read<R: Read>(read: R) -> Result<CanonicalTree, Box<dyn Error>>
pub fn encode<R: Read, W: Write>(
&self,
read: &mut R,
write: &mut W
) -> Result<(), Box<dyn Error>>
pub fn decode<R: Read, W: Write>(
&self,
read: &mut R,
write: &mut W
) -> Result<(), Box<dyn Error>>
Auto Trait Implementations
impl RefUnwindSafe for CanonicalTree
impl Send for CanonicalTree
impl Sync for CanonicalTree
impl Unpin for CanonicalTree
impl UnwindSafe for CanonicalTree
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more