Struct sigalign_impl::sequence_storage::in_memory::InMemoryStorage
source · pub struct InMemoryStorage { /* private fields */ }
Expand description
Basic SequenceStorage
implementation
Implementations§
source§impl InMemoryStorage
impl InMemoryStorage
pub fn get_label_safely(&self, target_index: u32) -> Option<String>
source§impl InMemoryStorage
impl InMemoryStorage
pub fn new() -> Self
pub fn add_target(&mut self, label: &str, sequence: &[u8])
pub fn add_fasta<R: Read>(&mut self, reader: R) -> Result<(), Utf8Error>
pub fn add_gzip_fasta<R: Read>(&mut self, reader: R) -> Result<(), Utf8Error>
pub fn merge(&mut self, other: Self)
pub fn get_sequence_safely(&self, target_index: u32) -> Option<Vec<u8>>
pub fn get_total_length(&self) -> u32
Trait Implementations§
source§impl Clone for InMemoryStorage
impl Clone for InMemoryStorage
source§fn clone(&self) -> InMemoryStorage
fn clone(&self) -> InMemoryStorage
Returns a copy 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 Debug for InMemoryStorage
impl Debug for InMemoryStorage
source§impl EstimateSize for InMemoryStorage
impl EstimateSize for InMemoryStorage
fn serialized_size(&self) -> usize
source§impl LabelStorage for InMemoryStorage
impl LabelStorage for InMemoryStorage
fn label_of_target_unchecked(&self, target_index: u32) -> String
source§impl PartialEq for InMemoryStorage
impl PartialEq for InMemoryStorage
source§fn eq(&self, other: &InMemoryStorage) -> bool
fn eq(&self, other: &InMemoryStorage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SequenceStorage for InMemoryStorage
impl SequenceStorage for InMemoryStorage
type Buffer = InMemoryBuffer
fn num_targets(&self) -> u32
fn get_buffer(&self) -> Self::Buffer
fn fill_buffer(&self, target_index: u32, buffer: &mut Self::Buffer)
fn get_concatenated_sequence_with_boundaries_of_targets( &self ) -> (Vec<u8>, Vec<u32>)
source§impl Serialize for InMemoryStorage
impl Serialize for InMemoryStorage
impl Eq for InMemoryStorage
impl StructuralEq for InMemoryStorage
impl StructuralPartialEq for InMemoryStorage
Auto Trait Implementations§
impl RefUnwindSafe for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnwindSafe for InMemoryStorage
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.