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
pub fn par_iter(&self) -> Iter<'_, ArrayType, DataArray>
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
pub fn par_iter_mut(&mut self) -> IterMut<'_, ArrayType, DataArray>
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 moreSource§impl Debug for BinaryArrayMap
impl Debug for BinaryArrayMap
Source§impl Default for BinaryArrayMap
impl Default for BinaryArrayMap
Source§fn default() -> BinaryArrayMap
fn default() -> BinaryArrayMap
Source§impl<'de> Deserialize<'de> for BinaryArrayMap
impl<'de> Deserialize<'de> for BinaryArrayMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<C: CentroidLike + From<CentroidPeak>> From<&BinaryArrayMap> for MZPeakSetType<C>
impl<C: CentroidLike + From<CentroidPeak>> From<&BinaryArrayMap> for MZPeakSetType<C>
Source§fn from(arrays: &BinaryArrayMap) -> MZPeakSetType<C>
fn from(arrays: &BinaryArrayMap) -> MZPeakSetType<C>
Source§impl From<&BinaryArrayMap> for DeconvolutedPeakSet
impl From<&BinaryArrayMap> for DeconvolutedPeakSet
Source§fn from(arrays: &BinaryArrayMap) -> DeconvolutedPeakSet
fn from(arrays: &BinaryArrayMap) -> DeconvolutedPeakSet
Source§impl From<&PeakSetVec<CentroidPeak, MZ>> for BinaryArrayMap
impl From<&PeakSetVec<CentroidPeak, MZ>> for BinaryArrayMap
Source§fn from(peaks: &PeakSet) -> BinaryArrayMap
fn from(peaks: &PeakSet) -> BinaryArrayMap
Source§impl From<&PeakSetVec<DeconvolutedPeak, Mass>> for BinaryArrayMap
impl From<&PeakSetVec<DeconvolutedPeak, Mass>> for BinaryArrayMap
Source§fn from(peaks: &DeconvolutedPeakSet) -> BinaryArrayMap
fn from(peaks: &DeconvolutedPeakSet) -> BinaryArrayMap
Source§impl From<ArrayPair<'_>> for BinaryArrayMap
impl From<ArrayPair<'_>> for BinaryArrayMap
Source§impl<C: CentroidLike + From<CentroidPeak>> From<BinaryArrayMap> for MZPeakSetType<C>
impl<C: CentroidLike + From<CentroidPeak>> From<BinaryArrayMap> for MZPeakSetType<C>
Source§fn from(arrays: BinaryArrayMap) -> MZPeakSetType<C>
fn from(arrays: BinaryArrayMap) -> MZPeakSetType<C>
Source§impl IntoIterator for BinaryArrayMap
impl IntoIterator for BinaryArrayMap
Source§impl Serialize for BinaryArrayMap
impl Serialize for BinaryArrayMap
Source§impl TryFrom<&BinaryArrayMap> for BinaryArrayMap3D
impl TryFrom<&BinaryArrayMap> for BinaryArrayMap3D
Source§type Error = ArrayRetrievalError
type Error = ArrayRetrievalError
Source§impl TryFrom<BinaryArrayMap> for BinaryArrayMap3D
impl TryFrom<BinaryArrayMap> for BinaryArrayMap3D
Source§type Error = ArrayRetrievalError
type Error = ArrayRetrievalError
Auto Trait Implementations§
impl Freeze for BinaryArrayMap
impl RefUnwindSafe for BinaryArrayMap
impl Send for BinaryArrayMap
impl Sync for BinaryArrayMap
impl Unpin for BinaryArrayMap
impl UnwindSafe for BinaryArrayMap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.