[][src]Struct bio::data_structures::bitenc::BitEnc

pub struct BitEnc { /* fields omitted */ }

A sequence of bitencoded values.

Methods

impl BitEnc[src]

pub fn new(width: usize) -> Self[src]

Create a new instance with a given encoding width (e.g. width=2 for using two bits per value).

pub fn with_capacity(width: usize, n: usize) -> Self[src]

Create a new instance with a given capacity and encoding width (e.g. width=2 for using two bits per value).

pub fn push(&mut self, value: u8)[src]

Append a value.

pub fn push_values(&mut self, n: usize, value: u8)[src]

Append n times the given value.

pub fn set(&mut self, i: usize, value: u8)[src]

Set the value as position i.

pub fn get(&self, i: usize) -> Option<u8>[src]

Get the value at position i.

Important traits for BitEncIter<'a>
pub fn iter(&self) -> BitEncIter[src]

Iterate over stored values (values will be unpacked into bytes).

pub fn clear(&mut self)[src]

Clear the sequence.

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

Trait Implementations

impl Serialize for BitEnc[src]

impl<'de> Deserialize<'de> for BitEnc[src]

Auto Trait Implementations

impl Sync for BitEnc

impl Unpin for BitEnc

impl Send for BitEnc

impl UnwindSafe for BitEnc

impl RefUnwindSafe for BitEnc

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]