rust_htslib::bcf::record

Struct Info

Source
pub struct Info<'a, B: BorrowMut<Buffer> + Borrow<Buffer>> { /* private fields */ }
Expand description

Info tag representation.

Implementations§

Source§

impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Info<'a, B>

Source

pub fn desc(&self) -> String

Short description of info tag.

Source

pub fn integer(self) -> Result<Option<BufferBacked<'b, &'b [i32], B>>>

Get integers from tag. None if tag not present in record.

Import bcf::record::Numeric for missing value handling.

Attention: the returned BufferBacked which holds the data has to be kept in scope as along as the data is accessed. If parts of the data are accessed while the BufferBacked object is already dropped, you will access unallocated memory.

Source

pub fn float(self) -> Result<Option<BufferBacked<'b, &'b [f32], B>>>

Get floats from tag. None if tag not present in record.

Import bcf::record::Numeric for missing value handling.

Attention: the returned BufferBacked which holds the data has to be kept in scope as along as the data is accessed. If parts of the data are accessed while the BufferBacked object is already dropped, you will access unallocated memory.

Source

pub fn flag(&mut self) -> Result<bool>

Get flags from tag. false if not set.

Source

pub fn string(self) -> Result<Option<BufferBacked<'b, Vec<&'b [u8]>, B>>>

Get strings from tag. None if tag not present in record.

Attention: the returned BufferBacked which holds the data has to be kept in scope as along as the data is accessed. If parts of the data are accessed while the BufferBacked object is already dropped, you will access unallocated memory.

Trait Implementations§

Source§

impl<'a, B: Debug + BorrowMut<Buffer> + Borrow<Buffer>> Debug for Info<'a, B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Info<'a, B>

Source§

impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Info<'a, B>

Auto Trait Implementations§

§

impl<'a, B> Freeze for Info<'a, B>
where B: Freeze,

§

impl<'a, B> RefUnwindSafe for Info<'a, B>
where B: RefUnwindSafe,

§

impl<'a, B> Unpin for Info<'a, B>
where B: Unpin,

§

impl<'a, B> UnwindSafe for Info<'a, B>
where B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T