/// Wrapper for opening a BAM file.
Wrapper for opening a BAM file.
Wrapper for opening a BAM file .
fn bgzf_open(path: &ffi::CStr, mode: &[u8]) -> Result<*mut htslib::BGZF, BGZFError> {
    let ret =
        unsafe { htslib::bgzf_open(path.as_ptr(), ffi::CString::new(mode).unwrap().as_ptr()) };
    if ret.is_null() {
        Err(BGZFError::Some)
    } else {
        Ok(ret)
    }
}
fn bgzf_open ( path : & ffi :: CStr , mode : & [ u8 ] ) -> Result < * mut htslib :: BGZF , BGZFError > { let ret = unsafe { htslib :: bgzf_open ( path . as_ptr ( ) , ffi :: CString :: new ( mode ) . unwrap ( ) . as_ptr ( ) ) } ; if ret . is_null ( ) { Err ( BGZFError :: Some ) } else { Ok ( ret ) } }
Wrapper for opening a BAM file.
Wrapper for opening a BAM file .
path
&ffi::CStr
mode
&[u8]