Trait constriction::backends::IntoReadWords [−][src]
pub trait IntoReadWords<Word, S: Semantics> {
type IntoReadWords: ReadWords<Word, S>;
fn into_read_words(self) -> Self::IntoReadWords;
}Expand description
A trait for types that can be turned into a source of compressed data (for decoders).
This trait is roughly analogous to the standard library trait IntoIterator, except
that it is generic over Word rather than having Word as an associated type. This
makes it possible to convert a single type into data sources of varying word sizes (for
example, one could imagine implementing both IntoReadWords<u32> and
IntoReadWords<u16> for Vec<u8> using the byteorder crate).
See also
- module level documentation for more information on the concept of sources and sinks of compressed data;
AsReadWordsfor a simliar conversion that does not take ownership of the data;IntoSeekReadWordsfor a conversion with stronger guarantees.
Associated Types
type IntoReadWords: ReadWords<Word, S>
type IntoReadWords: ReadWords<Word, S>
The type of the data source that will result from the conversion.
Required methods
fn into_read_words(self) -> Self::IntoReadWords
fn into_read_words(self) -> Self::IntoReadWords
Performs the conversion.
