pub trait AsBits<const N: usize> {
    // Required method
    fn as_bits(&self) -> [bool; N];
}
Expand description

Helper trait that implements functionality to represent a generic type as array of N-bits.

Required Methods§

source

fn as_bits(&self) -> [bool; N]

Return the bits of self, starting from the most significant.

Implementors§

source§

impl<T, const N: usize> AsBits<N> for T
where T: Copy + Into<usize>,