Struct biotest::format::fasta::Fasta

source ·
pub struct Fasta { /* private fields */ }
Expand description

Struct to generate random fastq record

Implementations§

source§

impl Fasta

source

pub fn builder( ) -> FastaBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building Fasta. On the builder, call .id(...)(optional), .id_len(...)(optional), .id_prefix(...)(optional), .id_suffix(...)(optional), .id_weights(...)(optional), .comment(...)(optional), .comment_len(...)(optional), .comment_prefix(...)(optional), .comment_suffix(...)(optional), .comment_weights(...)(optional), .sequence(...)(optional), .sequence_len(...)(optional), .sequence_weights(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of Fasta.

Trait Implementations§

source§

impl Default for Fasta

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Format for Fasta

source§

fn header(&self, _output: &mut dyn Write, _rng: &mut StdRng) -> Result<()>

Write header of format in output
source§

fn record(&self, output: &mut dyn Write, rng: &mut StdRng) -> Result<()>

Write a record in output
source§

fn records( &self, output: &mut dyn Write, rng: &mut StdRng, number: usize ) -> Result<()>

Write multiple record in output
source§

fn create<P>(&self, path: P, rng: &mut StdRng, number: usize) -> Result<()>
where P: AsRef<Path>,

Create a file at path with header and multiple records

Auto Trait Implementations§

§

impl Freeze for Fasta

§

impl RefUnwindSafe for Fasta

§

impl Send for Fasta

§

impl Sync for Fasta

§

impl Unpin for Fasta

§

impl UnwindSafe for Fasta

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V