noodles_bgzf/io/
seek.rs

1use std::io::{self, SeekFrom};
2
3use crate::{gzi, VirtualPosition};
4
5/// A seekable BGZF reader.
6pub trait Seek {
7    /// Seeks the stream to the given virtual position.
8    fn seek_to_virtual_position(&mut self, pos: VirtualPosition) -> io::Result<VirtualPosition>;
9
10    /// Seeks the stream to the given position using an index.
11    fn seek_with_index(&mut self, index: &gzi::Index, pos: SeekFrom) -> io::Result<u64>;
12}