pub struct PackedSeqVec { /* private fields */ }Expand description
A 2-bit packed owned sequence of DNA bases.
Trait Implementations§
Source§impl Clone for PackedSeqVec
impl Clone for PackedSeqVec
Source§fn clone(&self) -> PackedSeqVec
fn clone(&self) -> PackedSeqVec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CopyType for PackedSeqVec
impl CopyType for PackedSeqVec
Source§impl Debug for PackedSeqVec
impl Debug for PackedSeqVec
Source§impl Default for PackedSeqVec
impl Default for PackedSeqVec
Source§impl MemDbgImpl for PackedSeqVec
impl MemDbgImpl for PackedSeqVec
fn _mem_dbg_rec_on( &self, _memdbg_writer: &mut impl Write, _memdbg_total_size: usize, _memdbg_max_depth: usize, _memdbg_prefix: &mut String, _memdbg_is_last: bool, _memdbg_flags: DbgFlags, ) -> Result
fn _mem_dbg_depth_on( &self, writer: &mut impl Write, total_size: usize, max_depth: usize, prefix: &mut String, field_name: Option<&str>, is_last: bool, padded_size: usize, flags: DbgFlags, ) -> Result<(), Error>
Source§impl MemSize for PackedSeqVec
impl MemSize for PackedSeqVec
Source§impl SeqVec for PackedSeqVec
impl SeqVec for PackedSeqVec
Source§fn push_ascii(&mut self, seq: &[u8]) -> Range<usize>
fn push_ascii(&mut self, seq: &[u8]) -> Range<usize>
Push an ASCII sequence to an PackedSeqVec.
Aa map to 0, Cc to 1, Gg to 3, and Tt to 2.
Other characters are silently mapped into 0..4.
Uses the BMI2 pext instruction when available, based on the
n_to_bits_pext method described at
https://github.com/Daniel-Liu-c0deb0t/cute-nucleotides.
TODO: Support multiple ways of dealing with non-ACTG characters:
- panic on non-
ACGT, - filter out non-
ACGT.
type Seq<'s> = PackedSeq<'s>
Source§fn as_slice(&self) -> Self::Seq<'_>
fn as_slice(&self) -> Self::Seq<'_>
Get a non-owning slice to the underlying sequence. Read more
Source§fn push_seq<'a>(&mut self, seq: PackedSeq<'_>) -> Range<usize>
fn push_seq<'a>(&mut self, seq: PackedSeq<'_>) -> Range<usize>
Append the given sequence to the underlying storage. Read more
Source§fn slice(&self, range: Range<usize>) -> Self::Seq<'_>
fn slice(&self, range: Range<usize>) -> Self::Seq<'_>
Get a sub-slice of the sequence. Indices are character offsets.
Source§fn from_ascii(seq: &[u8]) -> Self
fn from_ascii(seq: &[u8]) -> Self
Create a
SeqVec from ASCII input.Auto Trait Implementations§
impl Freeze for PackedSeqVec
impl RefUnwindSafe for PackedSeqVec
impl Send for PackedSeqVec
impl Sync for PackedSeqVec
impl Unpin for PackedSeqVec
impl UnwindSafe for PackedSeqVec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> MemDbg for Twhere
T: MemDbgImpl,
impl<T> MemDbg for Twhere
T: MemDbgImpl,
Source§fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug infos about the structure memory usage, expanding
all levels of nested structures.
Source§fn mem_dbg_on(
&self,
writer: &mut impl Write,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_on( &self, writer: &mut impl Write, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug infos about the structure memory
usage, expanding all levels of nested structures.Source§fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug infos about the structure memory usage as
mem_dbg, but expanding only up to max_depth
levels of nested structures.Source§fn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
max_depth: usize,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_depth_on( &self, writer: &mut impl Write, max_depth: usize, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug infos about the structure memory
usage as mem_dbg_on, but expanding only up to
max_depth levels of nested structures.