pub trait HuffmanWrite<E: Endianness> {
// Required method
fn write_huffman<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
tree: &'life1 WriteHuffmanTree<E, T>,
symbol: T,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where T: Ord + Copy + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A trait for anything that can write Huffman codes of a given endianness to an output stream
Required Methods§
Sourcefn write_huffman<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
tree: &'life1 WriteHuffmanTree<E, T>,
symbol: T,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn write_huffman<'life0, 'life1, 'async_trait, T>( &'life0 mut self, tree: &'life1 WriteHuffmanTree<E, T>, symbol: T, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Writes Huffman code for the given symbol to the stream.
§Errors
Passes along any I/O error from the underlying stream.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.