pub trait DoubleType {
type DoubleType: Word;
// Required methods
fn as_double(&self) -> Self::DoubleType;
fn as_u64(&self) -> u64;
}Expand description
Trait providing the double-width type for a given unsigned integer type.
This is used by crate::impls::BufBitReader to provide a bit buffer
that is twice the width of the word read from the backend.
The methods
as_double/as_u64 can be
used to convert a word into its double-width type or to a u64,
respectively, without loss of precision.
Required Associated Types§
type DoubleType: Word
Required Methods§
Sourcefn as_double(&self) -> Self::DoubleType
fn as_double(&self) -> Self::DoubleType
Converts a word into its double-width type without loss of precision.