noodles::vcf::variant::record::samples

Trait Sample

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

Variant record samples sample.

Required Methods§

Source

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

Returns the value with the given key.

Source

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

Returns the value at the given index.

Source

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

Returns an iterator over fields.

Trait Implementations§

Source§

impl Sample for Box<dyn Sample + '_>

Source§

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

Returns the value with the given key.
Source§

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

Returns the value at the given index.
Source§

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

Returns an iterator over fields.

Implementations on Foreign Types§

Source§

impl Sample for Box<dyn Sample + '_>

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl Sample for noodles::bcf::record::samples::Sample<'_>

Source§

impl Sample for noodles::vcf::record::samples::Sample<'_>

Source§

impl Sample for noodles::vcf::variant::record_buf::samples::Sample<'_>