Trait noodles_vcf::variant::record::samples::Sample

source ·
pub trait Sample {
    // Required methods
    fn get<'a, 'h: 'a>(
        &'a self,
        header: &'h Header,
        key: &str,
    ) -> Option<Result<Option<Value<'a>>>>;
    fn get_index<'a, 'h: 'a>(
        &'a self,
        header: &'h Header,
        i: usize,
    ) -> Option<Result<Option<Value<'a>>>>;
    fn iter<'a, 'h: 'a>(
        &'a self,
        header: &'h Header,
    ) -> Box<dyn Iterator<Item = Result<(&'a str, Option<Value<'a>>)>> + 'a>;
}
Expand description

Variant record samples sample.

Required Methods§

source

fn get<'a, 'h: 'a>( &'a self, header: &'h Header, key: &str, ) -> Option<Result<Option<Value<'a>>>>

Returns the value with the given key.

source

fn get_index<'a, 'h: 'a>( &'a self, header: &'h Header, i: usize, ) -> Option<Result<Option<Value<'a>>>>

Returns the value at the given index.

source

fn iter<'a, 'h: 'a>( &'a self, header: &'h Header, ) -> Box<dyn Iterator<Item = Result<(&'a str, Option<Value<'a>>)>> + 'a>

Returns an iterator over fields.

Trait Implementations§

source§

impl Sample for Box<dyn Sample + '_>

source§

fn get<'a, 'h: 'a>( &'a self, header: &'h Header, key: &str, ) -> Option<Result<Option<Value<'a>>>>

Returns the value with the given key.
source§

fn get_index<'a, 'h: 'a>( &'a self, header: &'h Header, i: usize, ) -> Option<Result<Option<Value<'a>>>>

Returns the value at the given index.
source§

fn iter<'a, 'h: 'a>( &'a self, header: &'h Header, ) -> Box<dyn Iterator<Item = Result<(&'a str, Option<Value<'a>>)>> + 'a>

Returns an iterator over fields.

Implementations on Foreign Types§

source§

impl Sample for Box<dyn Sample + '_>

source§

fn get<'a, 'h: 'a>( &'a self, header: &'h Header, key: &str, ) -> Option<Result<Option<Value<'a>>>>

source§

fn get_index<'a, 'h: 'a>( &'a self, header: &'h Header, i: usize, ) -> Option<Result<Option<Value<'a>>>>

source§

fn iter<'a, 'h: 'a>( &'a self, header: &'h Header, ) -> Box<dyn Iterator<Item = Result<(&'a str, Option<Value<'a>>)>> + 'a>

Implementors§

source§

impl<'g> Sample for noodles_vcf::variant::record_buf::samples::sample::Sample<'g>

source§

impl<'r> Sample for noodles_vcf::record::samples::Sample<'r>