Struct rust_htslib::faidx::Reader
source · pub struct Reader { /* private fields */ }
Expand description
A Fasta reader.
Implementations§
source§impl Reader
impl Reader
sourcepub fn fetch_seq<N: AsRef<str>>(
&self,
name: N,
begin: usize,
end: usize
) -> Result<&[u8]>
pub fn fetch_seq<N: AsRef<str>>( &self, name: N, begin: usize, end: usize ) -> Result<&[u8]>
Fetch the sequence as a byte array.
§Arguments
name
- the name of the template sequence (e.g., “chr1”)begin
- the offset within the template sequence (starting with 0)end
- the end position to return (if smaller thanbegin
, the behavior is undefined).
sourcepub fn fetch_seq_string<N: AsRef<str>>(
&self,
name: N,
begin: usize,
end: usize
) -> Result<String>
pub fn fetch_seq_string<N: AsRef<str>>( &self, name: N, begin: usize, end: usize ) -> Result<String>
Fetches the sequence and returns it as string.
§Arguments
name
- the name of the template sequence (e.g., “chr1”)begin
- the offset within the template sequence (starting with 0)end
- the end position to return (if smaller thanbegin
, the behavior is undefined).
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Reader
impl !Send for Reader
impl !Sync for Reader
impl Unpin for Reader
impl UnwindSafe for Reader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more