pub struct RecordBuf { /* private fields */ }
Expand description
A GFF record.
Implementations§
Source§impl RecordBuf
impl RecordBuf
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Returns a builder to create a record from each of its fields.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::builder()
.set_reference_sequence_name("sq0")
.build();
assert_eq!(record.reference_sequence_name(), "sq0");
Sourcepub fn reference_sequence_name(&self) -> &str
pub fn reference_sequence_name(&self) -> &str
Returns the reference sequence name of the record.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert_eq!(record.reference_sequence_name(), ".");
Sourcepub fn source(&self) -> &str
pub fn source(&self) -> &str
Returns the source of the record.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert_eq!(record.source(), ".");
Sourcepub fn ty(&self) -> &str
pub fn ty(&self) -> &str
Returns the feature type of the record.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert_eq!(record.ty(), ".");
Sourcepub fn start(&self) -> Position
pub fn start(&self) -> Position
Returns the start position of the record.
This position is 1-based, inclusive.
§Examples
use noodles_core::Position;
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert_eq!(record.start(), Position::MIN);
Sourcepub fn end(&self) -> Position
pub fn end(&self) -> Position
Returns the end position of the record.
This position is 1-based, inclusive.
§Examples
use noodles_core::Position;
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert_eq!(record.end(), Position::MIN);
Sourcepub fn score(&self) -> Option<f32>
pub fn score(&self) -> Option<f32>
Returns the score of the record.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert!(record.score().is_none());
Sourcepub fn strand(&self) -> Strand
pub fn strand(&self) -> Strand
Returns the strand of the record.
§Examples
use noodles_gff::{self as gff, record::Strand};
let record = gff::RecordBuf::default();
assert_eq!(record.strand(), Strand::None);
Sourcepub fn phase(&self) -> Option<Phase>
pub fn phase(&self) -> Option<Phase>
Returns the phase of the record.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert!(record.phase().is_none());
Sourcepub fn attributes(&self) -> &Attributes
pub fn attributes(&self) -> &Attributes
Returns the attributes of the record.
§Examples
use noodles_gff as gff;
let record = gff::RecordBuf::default();
assert!(record.attributes().is_empty());
Trait Implementations§
impl StructuralPartialEq for RecordBuf
Auto Trait Implementations§
impl Freeze for RecordBuf
impl RefUnwindSafe for RecordBuf
impl Send for RecordBuf
impl Sync for RecordBuf
impl Unpin for RecordBuf
impl UnwindSafe for RecordBuf
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