pub struct RefRecord<'a> { /* private fields */ }
Expand description
A FASTQ record that borrows data from a buffer
Implementations§
source§impl<'a> RefRecord<'a>
impl<'a> RefRecord<'a>
pub fn to_owned_record(&self) -> OwnedRecord
sourcepub fn write_unchanged<W: Write>(&self, writer: W) -> Result<()>
pub fn write_unchanged<W: Write>(&self, writer: W) -> Result<()>
Writes a record to the given io::Write
instance
by just writing the unmodified input, which is faster than RefRecord::write
Trait Implementations§
source§impl<'a> Record for RefRecord<'a>
impl<'a> Record for RefRecord<'a>
fn id_bytes(&self) -> &[u8] ⓘ
source§fn id(&self) -> Result<&str, Utf8Error>
fn id(&self) -> Result<&str, Utf8Error>
Return the ID of the record (everything before an optional space) as string slice
fn desc_bytes(&self) -> Option<&[u8]>
source§fn desc(&self) -> Option<Result<&str, Utf8Error>>
fn desc(&self) -> Option<Result<&str, Utf8Error>>
Return the description of the record as string slice, if present. Otherwise,
None
is returned.source§fn id_desc_bytes(&self) -> (&[u8], Option<&[u8]>)
fn id_desc_bytes(&self) -> (&[u8], Option<&[u8]>)
Return both the ID and the description of the record (if present)
This should be faster than calling
id()
and desc()
separately.Auto Trait Implementations§
impl<'a> RefUnwindSafe for RefRecord<'a>
impl<'a> Send for RefRecord<'a>
impl<'a> Sync for RefRecord<'a>
impl<'a> Unpin for RefRecord<'a>
impl<'a> UnwindSafe for RefRecord<'a>
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