pub struct SeqWriter<W: Write> { /* private fields */ }
Implementations
sourceimpl<W: Write> SeqWriter<W>
impl<W: Write> SeqWriter<W>
sourcepub fn new(stream: W) -> Self
pub fn new(stream: W) -> Self
Create a new SeqWriter
to write GenBank files to the given stream.
sourcepub fn truncate_locus(&mut self, truncate: bool) -> &mut Self
pub fn truncate_locus(&mut self, truncate: bool) -> &mut Self
Set the behaviour regarding locus name truncation.
If true
(the default when creating a SeqWriter
, for backwards
compatibility), the locus fields (name
and molecule_type
) will be
truncated if they are too long so that the LOCUS line is no longer
than 79 characters.
By setting truncate
to false
, the full strings are written to the
LOCUS line, resulting in fields that may not in usual positions if
the name or molecule types are too long. Most parsers (including gb-io
and Biopython) should however be able to process these.
sourcepub fn escape_locus(&mut self, escape: bool) -> &mut Self
pub fn escape_locus(&mut self, escape: bool) -> &mut Self
Set the behaviour regarding locus name escaping.
If true
(the default when creating a SeqWriter
, for backwards
compatibility), any whitespace in the locus will be escaped with
and underscore (_).
Set to false
to write the locus as-is, which could result in an
invalid LOCUS line that some parsers may not be able to process.
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for SeqWriter<W> where
W: RefUnwindSafe,
impl<W> Send for SeqWriter<W> where
W: Send,
impl<W> Sync for SeqWriter<W> where
W: Sync,
impl<W> Unpin for SeqWriter<W> where
W: Unpin,
impl<W> UnwindSafe for SeqWriter<W> where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more