pub struct Reader { /* private fields */ }Implementations§
Source§impl Reader
impl Reader
pub fn new(env: Env, path: String, _opts: Option<ReaderOptions>) -> Result<Self>
pub fn header(&self, env: Env) -> Result<Reference<Header>>
pub fn has_index(&self) -> bool
pub fn query( &self, region_or_chrom: String, start0: Option<u32>, end0: Option<u32>, ) -> AsyncTask<QueryTask>
pub fn next(&self) -> AsyncTask<NextTask>
Sourcepub fn next_batch_async(
&self,
size: Option<u32>,
) -> Result<AsyncTask<NextBatchTask>>
pub fn next_batch_async( &self, size: Option<u32>, ) -> Result<AsyncTask<NextBatchTask>>
Read the next batch of variants asynchronously. Returns an array of Variant objects. Empty array means EOF. More efficient than next() for bulk iteration as it avoids creating {done, value} wrapper objects for each variant.
pub fn next_sync(&self, env: Env) -> Result<Object<'static>>
Sourcepub fn next_batch_sync(&self, size: Option<u32>) -> Result<Vec<Variant>>
pub fn next_batch_sync(&self, size: Option<u32>) -> Result<Vec<Variant>>
Read the next batch of variants synchronously. Returns an array of Variant objects. Empty array means EOF. This is more efficient than calling nextSync() repeatedly when processing many variants, as it avoids creating {done, value} wrapper objects for each variant.
pub fn close(&self)
Trait Implementations§
Source§impl FromNapiMutRef for Reader
impl FromNapiMutRef for Reader
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for Reader
impl FromNapiRef for Reader
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl JavaScriptClassExt for Reader
impl JavaScriptClassExt for Reader
fn into_instance<'scope>( self, env: &'scope Env, ) -> Result<ClassInstance<'scope, Self>>
fn into_reference(self, env: Env) -> Result<Reference<Self>>
fn instance_of<'env, V: JsValue<'env>>(env: &Env, value: &V) -> Result<bool>
Source§impl ToNapiValue for Reader
impl ToNapiValue for Reader
Source§unsafe fn to_napi_value(env: napi_env, val: Reader) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Reader) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Auto Trait Implementations§
impl Freeze for Reader
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