noodles_sam::alignment::record

Trait Sequence

Source
pub trait Sequence {
    // Required methods
    fn is_empty(&self) -> bool;
    fn len(&self) -> usize;
    fn get(&self, i: usize) -> Option<u8>;
    fn split_at_checked(
        &self,
        mid: usize,
    ) -> Option<(Box<dyn Sequence + '_>, Box<dyn Sequence + '_>)>;
    fn iter(&self) -> Box<dyn Iterator<Item = u8> + '_>;
}
Expand description

An alignment record sequence.

Required Methods§

Source

fn is_empty(&self) -> bool

Returns whether there are any bases.

Source

fn len(&self) -> usize

Returns the number of bases.

Source

fn get(&self, i: usize) -> Option<u8>

Returns the base at the given index.

Source

fn split_at_checked( &self, mid: usize, ) -> Option<(Box<dyn Sequence + '_>, Box<dyn Sequence + '_>)>

Splits the subsequence into two subsequences at the given index.

Source

fn iter(&self) -> Box<dyn Iterator<Item = u8> + '_>

Returns an iterator over bases.

Trait Implementations§

Source§

impl<'a> IntoIterator for &'a dyn Sequence

Source§

type Item = u8

The type of the elements being iterated over.
Source§

type IntoIter = Box<dyn Iterator<Item = <&'a dyn Sequence as IntoIterator>::Item> + 'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Sequence for Box<dyn Sequence + '_>

Source§

fn is_empty(&self) -> bool

Returns whether there are any bases.
Source§

fn len(&self) -> usize

Returns the number of bases.
Source§

fn get(&self, i: usize) -> Option<u8>

Returns the base at the given index.
Source§

fn split_at_checked( &self, mid: usize, ) -> Option<(Box<dyn Sequence + '_>, Box<dyn Sequence + '_>)>

Splits the subsequence into two subsequences at the given index.
Source§

fn iter(&self) -> Box<dyn Iterator<Item = u8> + '_>

Returns an iterator over bases.

Implementations on Foreign Types§

Source§

impl Sequence for Box<dyn Sequence + '_>

Source§

fn is_empty(&self) -> bool

Source§

fn len(&self) -> usize

Source§

fn get(&self, i: usize) -> Option<u8>

Source§

fn split_at_checked( &self, mid: usize, ) -> Option<(Box<dyn Sequence + '_>, Box<dyn Sequence + '_>)>

Source§

fn iter(&self) -> Box<dyn Iterator<Item = u8> + '_>

Implementors§

Source§

impl Sequence for &noodles_sam::alignment::record_buf::Sequence

Source§

impl<'a> Sequence for noodles_sam::record::Sequence<'a>