[][src]Struct rust_htslib::faidx::Reader

pub struct Reader { /* fields omitted */ }

A Fasta reader.

Implementations

impl Reader[src]

pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>[src]

Create a new Reader from a path.

Arguments

  • path - the path to open.

pub fn from_url(url: &Url) -> Result<Self, Error>[src]

Create a new Reader from an URL.

Arguments

  • url - the url to open

pub fn fetch_seq<N: AsRef<str>>(
    &self,
    name: N,
    begin: usize,
    end: usize
) -> Result<&[u8]>
[src]

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 than begin, the behavior is undefined).

pub fn fetch_seq_string<N: AsRef<str>>(
    &self,
    name: N,
    begin: usize,
    end: usize
) -> Result<String>
[src]

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 than begin, the behavior is undefined).

Trait Implementations

impl Debug for Reader[src]

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

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.