Trait Bits

Source
pub trait Bits {
    type Block: BlockType;

    // Required method
    fn bit_len(&self) -> u64;

    // Provided methods
    fn block_len(&self) -> usize { ... }
    fn get_bit(&self, position: u64) -> bool { ... }
    fn get_block(&self, position: usize) -> Self::Block { ... }
    fn get_raw_block(&self, position: usize) -> Self::Block { ... }
    fn get_bits(&self, start: u64, count: usize) -> Self::Block { ... }
    fn to_bit_vec(&self) -> BitVec<Self::Block> { ... }
}
Expand description

Read-only bit vector operations.

Minimal complete definition is:

Note that get_block in terms of get_bit is inefficient, and thus you should implement get_block directly if possible.

Required Associated Types§

Source

type Block: BlockType

The underlying block type used to store the bits of the vector.

Required Methods§

Source

fn bit_len(&self) -> u64

The length of the slice in bits.

Provided Methods§

Source

fn block_len(&self) -> usize

The length of the slice in blocks.

Source

fn get_bit(&self, position: u64) -> bool

Gets the bit at position

The default implementation calls get_block and masks out the correct bit.

§Panics

Panics if position is out of bounds.

Source

fn get_block(&self, position: usize) -> Self::Block

Gets the block at position, masked as necessary.

The bits are laid out Block::nbits() per block, with the notional zeroth bit in the least significant position. If self.bit_len() is not a multiple of Block::nbits() then the last block will contain extra zero bits that are not part of the bit vector.

The default implementation calls get_raw_block, but you can override with something more efficient, for example if masking is unnecessary.

§Panics

Panics if position is out of bounds.

Source

fn get_raw_block(&self, position: usize) -> Self::Block

Gets the block at position, without masking.

The default implementation of this method just delegates to [get_block](#method .get_block), which means it in fact does mask out extraneous bits. However, particular implementors may override this method to provide a more efficient implementation when one is possible.

§Panics

Panics if position is out of bounds.

Source

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Gets count bits starting at bit index start, interpreted as a little-endian integer.

§Panics

Panics if the bit span goes out of bounds.

Source

fn to_bit_vec(&self) -> BitVec<Self::Block>

Copies the bits into a new allocated BitVec.

Trait Implementations§

Source§

impl<Block: BlockType> Bits for Box<dyn Bits<Block = Block>>

Source§

type Block = Block

The underlying block type used to store the bits of the vector.
Source§

fn bit_len(&self) -> u64

The length of the slice in bits.
Source§

fn block_len(&self) -> usize

The length of the slice in blocks.
Source§

fn get_bit(&self, position: u64) -> bool

Gets the bit at position Read more
Source§

fn get_block(&self, position: usize) -> Self::Block

Gets the block at position, masked as necessary. Read more
Source§

fn get_raw_block(&self, position: usize) -> Self::Block

Gets the block at position, without masking. Read more
Source§

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Gets count bits starting at bit index start, interpreted as a little-endian integer. Read more
Source§

fn to_bit_vec(&self) -> BitVec<Self::Block>

Copies the bits into a new allocated BitVec.

Implementations on Foreign Types§

Source§

impl Bits for u8

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self

Source§

impl Bits for u16

Source§

type Block = u16

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self

Source§

impl Bits for u32

Source§

type Block = u32

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self

Source§

impl Bits for u64

Source§

type Block = u64

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self

Source§

impl Bits for u128

Source§

type Block = u128

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self

Source§

impl Bits for usize

Source§

type Block = usize

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self

Source§

impl Bits for Vec<bool>

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 0]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 1]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 2]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 3]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 4]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 5]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 6]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 7]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 8]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 9]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 10]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 11]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 12]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 13]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 14]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 15]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 16]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 17]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 18]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 19]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 20]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 21]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 22]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 23]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 24]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 25]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 26]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 27]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 28]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 29]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 30]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 31]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 32]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 64]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 128]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 256]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 512]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 1024]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 2048]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 4096]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 8192]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 16384]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 32768]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 65536]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 131072]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 262144]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 524288]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool; 1048576]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl Bits for [bool]

Source§

type Block = u8

Source§

fn bit_len(&self) -> u64

Source§

fn get_bit(&self, position: u64) -> bool

Source§

impl<'a, T: Bits + ?Sized> Bits for &'a T

Source§

type Block = <T as Bits>::Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_raw_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Source§

impl<'a, T: Bits + ?Sized> Bits for &'a mut T

Source§

type Block = <T as Bits>::Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_raw_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 0]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 1]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 2]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 3]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 4]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 5]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 6]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 7]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 8]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 9]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 10]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 11]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 12]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 13]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 14]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 15]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 16]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 17]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 18]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 19]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 20]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 21]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 22]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 23]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 24]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 25]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 26]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 27]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 28]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 29]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 30]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 31]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 32]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 64]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 128]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 256]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 512]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 1024]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 2048]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 4096]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 8192]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 16384]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 32768]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 65536]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 131072]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 262144]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 524288]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block; 1048576]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for [Block]

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Block

Source§

impl<Block: BlockType> Bits for Box<dyn Bits<Block = Block>>

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_raw_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for Box<dyn BitsMut<Block = Block>>

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Self::Block

Source§

fn get_raw_block(&self, position: usize) -> Self::Block

Source§

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Source§

impl<Block: BlockType> Bits for Vec<Block>

Source§

type Block = Block

Source§

fn bit_len(&self) -> u64

Source§

fn block_len(&self) -> usize

Source§

fn get_bit(&self, position: u64) -> bool

Source§

fn get_block(&self, position: usize) -> Block

Source§

fn get_raw_block(&self, position: usize) -> Block

Implementors§

Source§

impl<'a, Block: BlockType> Bits for BoolAdapter<Block, &'a [bool]>

Source§

type Block = Block

Source§

impl<'a, Block: BlockType> Bits for BoolAdapter<Block, &'a mut Vec<bool>>

Source§

type Block = Block

Source§

impl<'a, Block: BlockType> Bits for BoolAdapter<Block, &'a mut [bool]>

Source§

type Block = Block

Source§

impl<'a, Block: BlockType> Bits for BitSlice<'a, Block>

Source§

type Block = Block

Source§

impl<'a, Block: BlockType> Bits for BitSliceMut<'a, Block>

Source§

type Block = Block

Source§

impl<Block: BlockType> Bits for BitFill<Block>

Source§

type Block = Block

Source§

impl<Block: BlockType> Bits for BoolAdapter<Block, Vec<bool>>

Source§

type Block = Block

Source§

impl<Block: BlockType> Bits for BitVec<Block>

Source§

type Block = Block

Source§

impl<T, U> Bits for BitAnd<T, U>
where T: Bits, U: Bits<Block = T::Block>,

Source§

type Block = <T as Bits>::Block

Source§

impl<T, U> Bits for BitConcat<T, U>
where T: Bits, U: Bits<Block = T::Block>,

Source§

type Block = <T as Bits>::Block

Source§

impl<T, U> Bits for BitOr<T, U>
where T: Bits, U: Bits<Block = T::Block>,

Source§

type Block = <T as Bits>::Block

Source§

impl<T, U> Bits for BitXor<T, U>
where T: Bits, U: Bits<Block = T::Block>,

Source§

type Block = <T as Bits>::Block

Source§

impl<T, U, F> Bits for BitZip<T, U, F>
where T: Bits, U: Bits<Block = T::Block>, F: Fn(T::Block, T::Block) -> T::Block,

Source§

type Block = <T as Bits>::Block

Source§

impl<T: Bits> Bits for BitNot<T>

Source§

type Block = <T as Bits>::Block

Source§

impl<T: Bits> Bits for BitSliceAdapter<T>

Source§

type Block = <T as Bits>::Block