Struct noodles_fasta::Writer [−][src]
pub struct Writer<W> { /* fields omitted */ }
Expand description
A FASTA writer.
Implementations
Creates a FASTA writer.
Examples
use noodles_fasta as fasta; let writer = fasta::Writer::new(Vec::new());
Returns a reference to the underlying writer.
Examples
use noodles_fasta as fasta; let writer = fasta::Writer::new(Vec::new()); assert!(writer.get_ref().is_empty());
Writes a FASTA record.
Sequence lines are hard wrapped at 80 bases.
Examples
use noodles_fasta as fasta; let mut writer = fasta::Writer::new(Vec::new()); let definition = fasta::record::Definition::new(String::from("sq0"), None); let record = fasta::Record::new(definition, b"ACGT".to_vec()); writer.write_record(&record)?; assert_eq!(writer.get_ref(), b">sq0\nACGT\n");
Auto Trait Implementations
impl<W> RefUnwindSafe for Writer<W> where
W: RefUnwindSafe,
impl<W> UnwindSafe for Writer<W> where
W: UnwindSafe,