Struct noodles::tabix::index::header::Header[][src]

pub struct Header { /* fields omitted */ }
Expand description

A tabix index header.

Implementations

Creates a tabix index header builder.

Examples

use noodles_tabix as tabix;
let builder = tabix::index::Header::builder();

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);

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);

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);

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));

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'#');

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.