pub fn with_attrs(id: &str, desc: Option<&str>, seq: TextSlice<'_>, qual: &[u8]) -> Self {
        let desc = desc.map(|desc| desc.to_owned());
        Record {
            id: id.to_owned(),
            desc,
            seq: String::from_utf8(seq.to_vec()).unwrap(),
            qual: String::from_utf8(qual.to_vec()).unwrap(),
        }
    }
/// Create a new FastQ record from given attributes.
///
/// # Example
///
/// ```rust
/// use bio::io::fastq::Record;
///
/// let record = Record::with_attrs("id_str", Some("desc"), b"ATGCGGG", b"QQQQQQQ");
/// assert_eq!(record.id(), "id_str");
/// assert_eq!(record.desc(), Some("desc"));
/// assert_eq!(record.seq(), b"ATGCGGG");
/// assert_eq!(record.qual(), b"QQQQQQQ");
/// ```
Create a new FastQ record from given attributes.
Create a new FastQ record from given attributes .
pub fn with_attrs(id: &str, desc: Option<&str>, seq: TextSlice<'_>, qual: &[u8]) -> Self {
        let desc = desc.map(|desc| desc.to_owned());
        Record {
            id: id.to_owned(),
            desc,
            seq: String::from_utf8(seq.to_vec()).unwrap(),
            qual: String::from_utf8(qual.to_vec()).unwrap(),
        }
    }
pub fn with_attrs ( id : & str , desc : Option < & str > , seq : TextSlice < ' _ > , qual : & [ u8 ] ) -> Self { let desc = desc . map ( | desc | desc . to_owned ( ) ) ; Record { id : id . to_owned ( ) , desc , seq : String :: from_utf8 ( seq . to_vec ( ) ) . unwrap ( ) , qual : String :: from_utf8 ( qual . to_vec ( ) ) . unwrap ( ) , } }
Create a new FastQ record from given attributes.
Create a new FastQ record from given attributes .
id
&str
desc
Option<&str>
seq
TextSlice<'_>
qual
&[u8]
id
&str
desc
Option<&str>
seq
TextSlice<'_>
qual
&[u8]
example
```rust
use bio::io::fastq::Record.

let record = Record::with_attrs("id_str", Some("desc"), b"ATGCGGG", b"QQQQQQQ");
assert_eq!(record.id(), "id_str");
assert_eq!(record.desc(), Some("desc"));
assert_eq!(record.seq(), b"ATGCGGG");
assert_eq!(record.qual(), b"QQQQQQQ");
```
` ` ` rust use bio :: io :: fastq :: Record . let record = Record :: with_attrs ( " id_str " Some ( " desc " ) b " ATGCGGG " b " QQQQQQQ " ) ; assert_eq! ( record . id () " id_str " ) ; assert_eq! ( record . desc () Some ( " desc " )) ; assert_eq! ( record . seq () b " ATGCGGG " ) ; assert_eq! ( record . qual () b " QQQQQQQ " ) ; ` ` `