pub struct BinaryArrayMap {
pub byte_buffer_map: HashMap<ArrayType, DataArray>,
}
Expand description
A collection of DataArray
s that are identified by name.
Fields§
§byte_buffer_map: HashMap<ArrayType, DataArray>
Implementations§
Source§impl BinaryArrayMap
impl BinaryArrayMap
pub fn new() -> BinaryArrayMap
pub fn is_empty(&self) -> bool
Sourcepub fn has_ion_mobility(&self) -> bool
pub fn has_ion_mobility(&self) -> bool
Check if there is an ion mobility array present
Sourcepub fn iter(&self) -> Iter<'_, ArrayType, DataArray>
pub fn iter(&self) -> Iter<'_, ArrayType, DataArray>
Iterate over references to the key-value pairs of this map
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, ArrayType, DataArray>
pub fn iter_mut(&mut self) -> IterMut<'_, ArrayType, DataArray>
Iterate over mutable references to the key-value pairs of this map
Sourcepub fn encode_array(
&mut self,
array_type: &ArrayType,
compression: BinaryCompressionType,
) -> Result<(), ArrayRetrievalError>
pub fn encode_array( &mut self, array_type: &ArrayType, compression: BinaryCompressionType, ) -> Result<(), ArrayRetrievalError>
Sourcepub fn decode_all_arrays(&mut self) -> Result<(), ArrayRetrievalError>
pub fn decode_all_arrays(&mut self) -> Result<(), ArrayRetrievalError>
Decode all DataArray
in this map if they have not been decoded already so
that they are ready for use. If there are many arrays and the parallelism
feature
is enabled, arrays may be decoded in parallel.
Sourcepub fn decode_array(
&mut self,
array_type: &ArrayType,
) -> Result<(), ArrayRetrievalError>
pub fn decode_array( &mut self, array_type: &ArrayType, ) -> Result<(), ArrayRetrievalError>
Decode a specific DataArray
if it is present.
This method may fail if decoding fails or if the array type is missing.
Sourcepub fn get(&self, array_type: &ArrayType) -> Option<&DataArray>
pub fn get(&self, array_type: &ArrayType) -> Option<&DataArray>
Get a reference to a specific DataArray
if present
Sourcepub fn get_mut(&mut self, array_type: &ArrayType) -> Option<&mut DataArray>
pub fn get_mut(&mut self, array_type: &ArrayType) -> Option<&mut DataArray>
Get a mutable reference to a specific DataArray
if present
Sourcepub fn has_array(&self, array_type: &ArrayType) -> bool
pub fn has_array(&self, array_type: &ArrayType) -> bool
Check whether a specific ArrayType
is present
Sourcepub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
pub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
Search for a specific m/z
Sourcepub fn mzs(&self) -> Result<Cow<'_, [f64]>, ArrayRetrievalError>
pub fn mzs(&self) -> Result<Cow<'_, [f64]>, ArrayRetrievalError>
Get a reference to the m/z array if it is present
Sourcepub fn mzs_mut(&mut self) -> Result<&mut [f64], ArrayRetrievalError>
pub fn mzs_mut(&mut self) -> Result<&mut [f64], ArrayRetrievalError>
Get a mutable reference to the m/z array if it is present
Sourcepub fn intensities(&self) -> Result<Cow<'_, [f32]>, ArrayRetrievalError>
pub fn intensities(&self) -> Result<Cow<'_, [f32]>, ArrayRetrievalError>
Get a reference to the intensity array if it is present
Sourcepub fn intensities_mut(&mut self) -> Result<&mut [f32], ArrayRetrievalError>
pub fn intensities_mut(&mut self) -> Result<&mut [f32], ArrayRetrievalError>
Get a mutable reference to the intensity array if it is present
Sourcepub fn charges(&self) -> Result<Cow<'_, [i32]>, ArrayRetrievalError>
pub fn charges(&self) -> Result<Cow<'_, [i32]>, ArrayRetrievalError>
Get a reference to the charge array if it is present
Sourcepub fn charge_mut(&mut self) -> Result<&mut [i32], ArrayRetrievalError>
pub fn charge_mut(&mut self) -> Result<&mut [i32], ArrayRetrievalError>
Get a mutable reference to the charge array if it is present
Sourcepub fn ion_mobility(
&self,
) -> Result<(Cow<'_, [f64]>, ArrayType), ArrayRetrievalError>
pub fn ion_mobility( &self, ) -> Result<(Cow<'_, [f64]>, ArrayType), ArrayRetrievalError>
Get a reference to the ion mobility array if it is present
Sourcepub fn ion_mobility_mut(
&mut self,
) -> Result<(&mut [f64], ArrayType), ArrayRetrievalError>
pub fn ion_mobility_mut( &mut self, ) -> Result<(&mut [f64], ArrayType), ArrayRetrievalError>
Get a mutable reference to the ion mobility array if it is present
Sourcepub fn stack_ion_mobility(self) -> Result<BinaryArrayMap3D, ArrayRetrievalError>
pub fn stack_ion_mobility(self) -> Result<BinaryArrayMap3D, ArrayRetrievalError>
Split an array map along the ion mobility dimension if it is present.
This function will fail if there is no ion mobility dimension.
Trait Implementations§
Source§impl Clone for BinaryArrayMap
impl Clone for BinaryArrayMap
Source§fn clone(&self) -> BinaryArrayMap
fn clone(&self) -> BinaryArrayMap
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more