[−][src]Struct rust_htslib::bcf::header::HeaderView
Fields
inner: *mut bcf_hdr_t
Methods
impl HeaderView
[src]
pub fn new(inner: *mut bcf_hdr_t) -> Self
[src]
pub fn sample_count(&self) -> u32
[src]
Get the number of samples defined in the header.
pub fn samples(&self) -> Vec<&[u8]>
[src]
Get vector of sample names defined in the header.
pub fn sample_id(&self, sample: &[u8]) -> Option<usize>
[src]
Obtain id (column index) of given sample.
Returns None
if sample is not present in header.
pub fn contig_count(&self) -> u32
[src]
Get the number of contigs defined in the header.
pub fn rid2name(&self, rid: u32) -> Result<&[u8]>
[src]
pub fn name2rid(&self, name: &[u8]) -> Result<u32>
[src]
pub fn info_type(&self, tag: &[u8]) -> Result<(TagType, TagLength)>
[src]
pub fn format_type(&self, tag: &[u8]) -> Result<(TagType, TagLength)>
[src]
pub fn name_to_id(&self, id: &[u8]) -> Result<Id>
[src]
Convert string ID (e.g., for a FILTER
value) to its numeric identifier.
pub fn id_to_name(&self, id: Id) -> Vec<u8>
[src]
Convert integer representing an identifier (e.g., a FILTER
value) to its string
name.bam.
pub fn sample_to_id(&self, id: &[u8]) -> Result<Id>
[src]
Convert string sample name to its numeric identifier.
pub fn id_to_sample(&self, id: Id) -> Vec<u8>
[src]
Convert integer representing an contig to its name.
pub fn header_records(&self) -> Vec<HeaderRecord>
[src]
Return structured HeaderRecord
s.
Trait Implementations
impl Clone for HeaderView
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for HeaderView
[src]
impl Drop for HeaderView
[src]
Auto Trait Implementations
impl RefUnwindSafe for HeaderView
impl !Send for HeaderView
impl !Sync for HeaderView
impl Unpin for HeaderView
impl UnwindSafe for HeaderView
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,