Struct noodles_fasta::fai::Record
source · pub struct Record { /* private fields */ }
Expand description
A FASTA index record.
Implementations§
source§impl Record
impl Record
sourcepub fn new<N>(
name: N,
length: u64,
offset: u64,
line_bases: u64,
line_width: u64
) -> Self
pub fn new<N>( name: N, length: u64, offset: u64, line_bases: u64, line_width: u64 ) -> Self
Creates a FASTA index record.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 8, 4, 80, 81);
sourcepub fn name(&self) -> &[u8] ⓘ
pub fn name(&self) -> &[u8] ⓘ
Returns the record name.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 8, 4, 80, 81);
assert_eq!(record.name(), b"sq0");
sourcepub fn len(&self) -> u64
👎Deprecated since 0.23.0: Use Record::length
instead.
pub fn len(&self) -> u64
Record::length
instead.Returns the length of the sequence.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 8, 4, 80, 81);
assert_eq!(record.len(), 8);
sourcepub fn length(&self) -> u64
pub fn length(&self) -> u64
Returns the length of the sequence.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 8, 4, 80, 81);
assert_eq!(record.length(), 8);
sourcepub fn offset(&self) -> u64
pub fn offset(&self) -> u64
Returns the offset from the start.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 10946, 4, 80, 81);
assert_eq!(record.offset(), 4);
sourcepub fn line_bases(&self) -> u64
pub fn line_bases(&self) -> u64
Returns the number of bases in a line.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 10946, 4, 80, 81);
assert_eq!(record.line_bases(), 80);
sourcepub fn line_width(&self) -> u64
pub fn line_width(&self) -> u64
Returns the number of characters in a line.
§Examples
use noodles_fasta::fai;
let record = fai::Record::new("sq0", 10946, 4, 80, 81);
assert_eq!(record.line_width(), 81);
Trait Implementations§
source§impl PartialEq for Record
impl PartialEq for Record
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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