[][src]Struct bam::record::cigar::Cigar

pub struct Cigar(_);

A wrapper around raw Cigar.

Methods

impl Cigar[src]

pub fn clear(&mut self)[src]

Clears the contents but does not touch capacity.

pub fn fill_from_raw<I: IntoIterator<Item = u32>>(&mut self, iter: I)[src]

Fills Cigar from raw data.

pub fn fill_from_text<I: IntoIterator<Item = u8>>(
    &mut self,
    text: I
) -> Result<(), String>
[src]

Fills Cigar from text. If the error occured, the cigar may be filled partly.

pub fn at(&self, index: usize) -> (u32, Operation)[src]

Returns a pair (length, operation) by its index.

pub fn iter(&self) -> impl Iterator<Item = (u32, Operation)> + '_[src]

Returns an iterator over typles (length, operation).

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

Cigar length.

pub fn raw(&self) -> &[u32][src]

Returns raw Cigar. Each u32 value represents length << 4 | operation, where operations are encoded from 0 to 8.

pub fn calculate_ref_len(&self) -> u32[src]

Calculates reference alignment length. Consider using Record::calculate_end, as the record alignment end is stored once calculated.

pub fn calculate_query_len(&self) -> u32[src]

Calculates query length.

pub fn shrink_to_fit(&mut self)[src]

Shrink inner vector

pub fn write_readable<W: Write>(&self, f: &mut W) -> Result<()>[src]

Writes to f in a human readable format. Write * if empty.

Trait Implementations

impl Display for Cigar[src]

Auto Trait Implementations

impl Send for Cigar

impl Unpin for Cigar

impl Sync for Cigar

impl UnwindSafe for Cigar

impl RefUnwindSafe for Cigar

Blanket Implementations

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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