noodles_sam/alignment/io/
read.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::io;

use crate::{alignment::Record, Header};

/// An alignment reader.
pub trait Read<R> {
    /// Reads a SAM header.
    fn read_alignment_header(&mut self) -> io::Result<Header>;

    /// Returns an iterator over records.
    fn alignment_records<'a>(
        &'a mut self,
        header: &'a Header,
    ) -> Box<dyn Iterator<Item = io::Result<Box<dyn Record>>> + 'a>;
}