pub trait BitVecNative {
    const BITS: u32;

    // Required methods
    fn encode(self) -> usize;
    fn decode(encoded: usize) -> Self;
}
Expand description

Trait for items which know how to encode themselves for storing in a BitVec

Required Associated Constants§

source

const BITS: u32

Number of bits in an encoded item

Required Methods§

source

fn encode(self) -> usize

Encode an item into its representation as bits

source

fn decode(encoded: usize) -> Self

Decode an item from its representation as bits

Implementations on Foreign Types§

source§

impl BitVecNative for bool

source§

const BITS: u32 = 1u32

source§

fn encode(self) -> usize

source§

fn decode(encoded: usize) -> Self

Implementors§