pub trait Record {
// Required methods
fn head(&self) -> &[u8] ⓘ;
fn seq(&self) -> &[u8] ⓘ;
fn qual(&self) -> &[u8] ⓘ;
// Provided methods
fn id_bytes(&self) -> &[u8] ⓘ { ... }
fn id(&self) -> Result<&str, Utf8Error> { ... }
fn desc_bytes(&self) -> Option<&[u8]> { ... }
fn desc(&self) -> Option<Result<&str, Utf8Error>> { ... }
fn id_desc_bytes(&self) -> (&[u8], Option<&[u8]>) { ... }
fn id_desc(&self) -> Result<(&str, Option<&str>), Utf8Error> { ... }
fn write<W: Write>(&self, writer: W) -> Result<()> { ... }
}Expand description
FASTQ record trait implemented by both RefRecord and OwnedRecord
Required Methods§
Provided Methods§
fn id_bytes(&self) -> &[u8] ⓘ
Sourcefn 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]>
Sourcefn 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.
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.