pub struct Header { /* private fields */ }
Expand description
A tabix index header.
Implementations
sourceimpl Header
impl Header
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a tabix index header builder.
Examples
use noodles_tabix as tabix;
let builder = tabix::index::Header::builder();
sourcepub fn format(&self) -> Format
pub fn format(&self) -> Format
Returns the format.
Examples
use noodles_tabix::{self as tabix, index::header::Format};
let header = tabix::index::Header::builder()
.set_format(Format::Vcf)
.build();
assert_eq!(header.format(), Format::Vcf);
sourcepub fn reference_sequence_name_index(&self) -> usize
pub fn reference_sequence_name_index(&self) -> usize
Returns the reference sequence name field index.
This index is 1-based.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_reference_sequence_name_index(1)
.build();
assert_eq!(header.reference_sequence_name_index(), 1);
sourcepub fn start_position_index(&self) -> usize
pub fn start_position_index(&self) -> usize
Returns the start position field index.
This index is 1-based.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_start_position_index(4)
.build();
assert_eq!(header.start_position_index(), 4);
sourcepub fn end_position_index(&self) -> Option<usize>
pub fn end_position_index(&self) -> Option<usize>
Returns the end position field index.
This index is 1-based. It is not set if the format does not have a column for the end position.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_end_position_index(Some(5))
.build();
assert_eq!(header.end_position_index(), Some(5));
sourcepub fn line_comment_prefix(&self) -> u8
pub fn line_comment_prefix(&self) -> u8
Returns the line comment prefix.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_line_comment_prefix(b'#')
.build();
assert_eq!(header.line_comment_prefix(), b'#');
sourcepub fn line_skip_count(&self) -> u32
pub fn line_skip_count(&self) -> u32
Returns the number of lines to skip.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_line_skip_count(0)
.build();
assert_eq!(header.line_skip_count(), 0);
Trait Implementations
impl Eq for Header
impl StructuralEq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more