/// Create a new `Record` from given attributes.
///
/// # Examples
/// ```rust
/// use bio::io::fasta::Record;
///
/// let read_id = "read1";
/// let description = Some("sampleid=foobar");
/// let sequence = b"ACGT";
/// let record = Record::with_attrs(read_id, description, sequence);
///
/// assert_eq!(">read1 sampleid=foobar\nACGT\n", record.to_string())
/// ```
Create a new `Record` from given attributes.
Create a new ` Record ` from given attributes .
pub fn with_attrs(id: &str, desc: Option<&str>, seq: TextSlice<'_>) -> Self {
        let desc = desc.map(|desc| desc.to_owned());
        Record {
            id: id.to_owned(),
            desc,
            seq: String::from_utf8(seq.to_vec()).unwrap(),
        }
    }
pub fn with_attrs ( id : & str , desc : Option < & str > , seq : TextSlice < ' _ > ) -> Self { let desc = desc . map ( | desc | desc . to_owned ( ) ) ; Record { id : id . to_owned ( ) , desc , seq : String :: from_utf8 ( seq . to_vec ( ) ) . unwrap ( ) , } }
Create a new `Record` from given attributes.
Create a new ` Record ` from given attributes .
id
&str
desc
Option<&str>
seq
TextSlice<'_>
examples
```rust
use bio::io::fasta::Record.

let read_id = "read1";
let description = Some("sampleid=foobar");
let sequence = b"ACGT";
let record = Record::with_attrs(read_id, description, sequence).

assert_eq!(">read1 sampleid=foobar\nACGT\n", record.to_string())
```
` ` ` rust use bio :: io :: fasta :: Record . let read_id = " read1 " ; let description = Some ( " sampleid = foobar " ) ; let sequence = b " ACGT " ; let record = Record :: with_attrs ( read_id description sequence ) . assert_eq! ( " > read1 sampleid = foobar \ nACGT \ n " record . to_string () ) ` ` `