Struct noodles_gff::record::Record
source · pub struct Record { /* private fields */ }
Expand description
A GFF record.
Implementations§
source§impl Record
impl Record
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::Record::builder()
.set_reference_sequence_name(String::from("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::Record::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::Record::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::Record::default();
assert_eq!(record.ty(), ".");
sourcepub fn start(&self) -> Position
pub fn start(&self) -> Position
Returns the start position of the record.
This value is 1-based.
§Examples
use noodles_core::Position;
use noodles_gff as gff;
let record = gff::Record::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 value is 1-based.
§Examples
use noodles_core::Position;
use noodles_gff as gff;
let record = gff::Record::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::Record::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::Record::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::Record::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::Record::default();
assert!(record.attributes().is_empty());
Trait Implementations§
source§impl PartialEq for Record
impl PartialEq 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