Struct noodles_gtf::Writer[][src]

pub struct Writer<W> { /* fields omitted */ }
Expand description

A GTF writer.

Implementations

Creates a GTF writer.

Examples
use noodles_gtf as gtf;
let writer = gtf::Writer::new(Vec::new());

Returns a reference to the underlying writer.

Examples
use noodles_gtf as gtf;
let writer = gtf::Writer::new(Vec::new());
assert!(writer.get_ref().is_empty());

Returns a mutable reference to the underlying writer.

Examples
use noodles_gtf as gtf;
let mut writer = gtf::Writer::new(Vec::new());
writer.get_mut().write_all(b"ndls")?;
assert_eq!(writer.get_ref(), b"ndls");

Returns the underlying writer.

Examples
use noodles_gtf as gtf;
let writer = gtf::Writer::new(Vec::new());
assert!(writer.into_inner().is_empty());

Writes a GTF record.

Examples
use noodles_gtf as gtf;

let mut writer = gtf::Writer::new(Vec::new());

let record = gtf::Record::default();
writer.write_record(&record)?;

let expected = b".\t.\t.\t1\t1\t.\t.\t.\t\n";
assert_eq!(writer.into_inner(), expected);

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

Performs the conversion.

Performs the conversion.

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.