pub struct Header { /* private fields */ }
Expand description
A tabix index header.
Implementations§
Source§impl Header
impl Header
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a tabix index header builder.
§Examples
use noodles_csi::binning_index::index::Header;
let builder = Header::builder();
Sourcepub fn format(&self) -> Format
pub fn format(&self) -> Format
Returns the format.
§Examples
use noodles_csi::binning_index::index::{header::Format, Header};
let header = 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 0-based.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_reference_sequence_name_index(0).build();
assert_eq!(header.reference_sequence_name_index(), 0);
Sourcepub fn start_position_index(&self) -> usize
pub fn start_position_index(&self) -> usize
Returns the start position field index.
This index is 0-based.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_start_position_index(3).build();
assert_eq!(header.start_position_index(), 3);
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 0-based. It is not set if the format does not have a column for the end position.
§Examples
use noodles_csi::binning_index::index::Header;
let header = 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_csi::binning_index::index::Header;
let header = 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_csi::binning_index::index::Header;
let header = Header::builder().set_line_skip_count(0).build();
assert_eq!(header.line_skip_count(), 0);
Sourcepub fn reference_sequence_names(&self) -> &ReferenceSequenceNames
pub fn reference_sequence_names(&self) -> &ReferenceSequenceNames
Returns the reference sequence names.
§Examples
use noodles_csi::binning_index::index::{header::ReferenceSequenceNames, Header};
let reference_sequence_names = ReferenceSequenceNames::new();
let header = Header::builder()
.set_reference_sequence_names(reference_sequence_names.clone())
.build();
assert_eq!(header.reference_sequence_names(), &reference_sequence_names);
Sourcepub fn reference_sequence_names_mut(&mut self) -> &mut ReferenceSequenceNames
pub fn reference_sequence_names_mut(&mut self) -> &mut ReferenceSequenceNames
Returns a mutable reference to the reference sequence names.
§Examples
use noodles_csi::binning_index::index::{header::ReferenceSequenceNames, Header};
let reference_sequence_names = ReferenceSequenceNames::new();
let mut header = Header::default();
*header.reference_sequence_names_mut() = reference_sequence_names.clone();
assert_eq!(header.reference_sequence_names(), &reference_sequence_names);
Trait Implementations§
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.