pub struct FastaExporter { /* private fields */ }Expand description
Serializes SBOL 3 Documents to FASTA.
Records are emitted in document order: each Component’s referenced
sequences first (headed by the component’s display ID and description),
then any sequences not referenced by a component (headed by their own
display ID). Sequences without elements are skipped.
Implementations§
Source§impl FastaExporter
impl FastaExporter
Sourcepub fn with_line_width(self, width: usize) -> Self
pub fn with_line_width(self, width: usize) -> Self
Sets the column at which sequence bodies wrap. A width of 0 is treated as 1 to avoid emitting empty lines.
Sourcepub fn write<W: Write>(
&self,
document: &Document,
writer: &mut W,
) -> Result<ExportReport, ExportError>
pub fn write<W: Write>( &self, document: &Document, writer: &mut W, ) -> Result<ExportReport, ExportError>
Writes FASTA to an arbitrary writer, returning a tally of records.
Sourcepub fn write_path(
&self,
document: &Document,
path: impl AsRef<Path>,
) -> Result<ExportReport, ExportError>
pub fn write_path( &self, document: &Document, path: impl AsRef<Path>, ) -> Result<ExportReport, ExportError>
Writes FASTA to a file on disk.
Trait Implementations§
Source§impl Clone for FastaExporter
impl Clone for FastaExporter
Source§fn clone(&self) -> FastaExporter
fn clone(&self) -> FastaExporter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FastaExporter
impl Debug for FastaExporter
Auto Trait Implementations§
impl Freeze for FastaExporter
impl RefUnwindSafe for FastaExporter
impl Send for FastaExporter
impl Sync for FastaExporter
impl Unpin for FastaExporter
impl UnsafeUnpin for FastaExporter
impl UnwindSafe for FastaExporter
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