Struct noodles_fastq::fai::Writer
source · pub struct Writer<W> { /* private fields */ }
Expand description
A FASTQ index writer.
Implementations§
source§impl<W> Writer<W>where
W: Write,
impl<W> Writer<W>where
W: Write,
sourcepub fn new(inner: W) -> Self
pub fn new(inner: W) -> Self
Creates a FASTQ index writer.
§Examples
use noodles_fastq::fai;
let mut writer = fai::Writer::new(Vec::new());
sourcepub fn get_ref(&self) -> &W
pub fn get_ref(&self) -> &W
Returns a reference to the underlying writer.
§Examples
use noodles_fastq::fai;
let mut writer = fai::Writer::new(Vec::new());
assert!(writer.get_ref().is_empty());
sourcepub fn write_record(&mut self, record: &Record) -> Result<()>
pub fn write_record(&mut self, record: &Record) -> Result<()>
Writes a FASTQ index record.
§Examples
use noodles_fastq::fai;
let mut writer = fai::Writer::new(Vec::new());
let record = fai::Record::new("r0", 4, 4, 4, 5, 11);
writer.write_record(&record)?;
assert_eq!(writer.get_ref(), b"r0\t4\t4\t4\t5\t11\n");
Auto Trait Implementations§
impl<W> Freeze for Writer<W>where
W: Freeze,
impl<W> RefUnwindSafe for Writer<W>where
W: RefUnwindSafe,
impl<W> Send for Writer<W>where
W: Send,
impl<W> Sync for Writer<W>where
W: Sync,
impl<W> Unpin for Writer<W>where
W: Unpin,
impl<W> UnwindSafe for Writer<W>where
W: UnwindSafe,
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