Struct bio::data_structures::bitenc::BitEnc
[−]
[src]
pub struct BitEnc { // some fields omitted }
A sequence of bitencoded values.
Methods
impl BitEnc
[src]
fn new(width: usize) -> Self
Create a new instance with a given encoding width (e.g. width=2 for using two bits per value).
fn with_capacity(width: usize, n: usize) -> Self
Create a new instance with a given capacity and encoding width (e.g. width=2 for using two bits per value).
fn push(&mut self, value: u8)
Append a value.
fn push_values(&mut self, n: usize, value: u8)
Append n
times the given value.
fn set(&mut self, i: usize, value: u8)
Set the value as position i
.
fn get(&self, i: usize) -> Option<u8>
Get the value at position i
.
fn iter(&self) -> BitEncIter
Iterate over stored values (values will be unpacked into bytes).
fn clear(&mut self)
Clear the sequence.