pub struct Variant { /* private fields */ }Implementations§
Source§impl Variant
impl Variant
pub fn chrom(&self) -> Result<String>
pub fn rid(&self) -> Result<Option<u32>>
pub fn pos(&self) -> Result<i64>
pub fn start(&self) -> Result<i64>
pub fn stop(&self) -> Result<i64>
pub fn id(&self) -> Result<String>
pub fn set_id(&mut self, id: String) -> Result<()>
pub fn reference(&self) -> Result<String>
pub fn alt(&self) -> Result<Vec<String>>
pub fn qual(&self) -> Result<Option<f64>>
pub fn set_qual(&mut self, qual: Option<f64>) -> Result<()>
pub fn filter(&self) -> Result<Vec<String>>
pub fn set_filter(&mut self, filter: Vec<String>) -> Result<()>
pub fn to_string(&self) -> Result<String>
pub fn info(&self, env: Env, tag: String) -> Result<napi_value>
pub fn format(&self, env: Env, tag: String) -> Result<napi_value>
pub fn sample(&self, env: Env, name: String) -> Result<napi_value>
pub fn samples( &self, env: Env, subset: Option<Vec<String>>, ) -> Result<napi_value>
pub fn genotypes(&self, subset: Option<Vec<String>>) -> Result<Vec<Genotype>>
pub fn set_genotypes(&mut self, genotypes: Vec<Genotype>) -> Result<()>
pub fn translate(&mut self, header: &Header) -> Result<()>
pub fn set_info(&mut self, tag: String, value: Unknown<'_>) -> Result<()>
Sourcepub fn set_format(&mut self, tag: String, value: Unknown<'_>) -> Result<()>
pub fn set_format(&mut self, tag: String, value: Unknown<'_>) -> Result<()>
Set a FORMAT field value (array with one entry per sample).
Values should be an array with one entry per sample. Each entry can be:
- A scalar (number or string) for Number=1 fields
- An array of values for multi-value fields
- null for missing values
Pass null to clear the FORMAT field entirely.
Trait Implementations§
Source§impl FromNapiMutRef for Variant
impl FromNapiMutRef for Variant
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 Variant
impl FromNapiRef for Variant
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 Variant
impl JavaScriptClassExt for Variant
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 Variant
impl ToNapiValue for Variant
Source§unsafe fn to_napi_value(env: napi_env, val: Variant) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Variant) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnwindSafe for Variant
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