#[non_exhaustive]pub enum AsyncMZReaderType<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync = CentroidPeak, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync = DeconvolutedPeak> {
MzML(AsyncMzMLReaderType<R, C, D>),
MGF(AsyncMGFReaderType<R, C, D>),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MzML(AsyncMzMLReaderType<R, C, D>)
MGF(AsyncMGFReaderType<R, C, D>)
Implementations§
Source§impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync> AsyncMZReaderType<R, C, D>
impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync> AsyncMZReaderType<R, C, D>
pub fn builder() -> AsyncMZReaderBuilder<C, D>
Sourcepub fn as_format(&self) -> MassSpectrometryFormat
pub fn as_format(&self) -> MassSpectrometryFormat
Get the file format for this reader
pub async fn open_read_seek(source: R) -> Result<AsyncMZReaderType<R, C, D>>
Trait Implementations§
Source§impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncIntoIonMobilityFrameSource<C, D> for AsyncMZReaderType<R, C, D>
Unlike the synchronous MZReaderType, every variant here is converted through
AsyncGeneric3DIonMobilityFrameSource. There is no dispatch-based async ion mobility
type yet do to lack of native support for async reading in existing formats.
impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncIntoIonMobilityFrameSource<C, D> for AsyncMZReaderType<R, C, D>
Unlike the synchronous MZReaderType, every variant here is converted through
AsyncGeneric3DIonMobilityFrameSource. There is no dispatch-based async ion mobility
type yet do to lack of native support for async reading in existing formats.
Source§type IonMobilityFrameSource<CF: FeatureLike<MZ, IonMobility> + Send + Sync, DF: FeatureLike<Mass, IonMobility> + KnownCharge + Send + Sync> = AsyncGeneric3DIonMobilityFrameSource<C, D, AsyncMZReaderType<R, C, D>, CF, DF>
type IonMobilityFrameSource<CF: FeatureLike<MZ, IonMobility> + Send + Sync, DF: FeatureLike<Mass, IonMobility> + KnownCharge + Send + Sync> = AsyncGeneric3DIonMobilityFrameSource<C, D, AsyncMZReaderType<R, C, D>, CF, DF>
Source§async fn try_into_frame_source<CF: FeatureLike<MZ, IonMobility> + Send + Sync, DF: FeatureLike<Mass, IonMobility> + KnownCharge + Send + Sync>(
self,
) -> Result<Self::IonMobilityFrameSource<CF, DF>, IntoIonMobilityFrameSourceError>
async fn try_into_frame_source<CF: FeatureLike<MZ, IonMobility> + Send + Sync, DF: FeatureLike<Mass, IonMobility> + KnownCharge + Send + Sync>( self, ) -> Result<Self::IonMobilityFrameSource<CF, DF>, IntoIonMobilityFrameSourceError>
Attempt to convert the
AsyncSpectrumSource into an AsyncIonMobilityFrameSource,
returning IntoIonMobilityFrameSourceError if it is not possibleSource§async fn into_frame_source<CF: FeatureLike<MZ, IonMobility> + Send + Sync, DF: FeatureLike<Mass, IonMobility> + KnownCharge + Send + Sync>(
self,
) -> Self::IonMobilityFrameSource<CF, DF>
async fn into_frame_source<CF: FeatureLike<MZ, IonMobility> + Send + Sync, DF: FeatureLike<Mass, IonMobility> + KnownCharge + Send + Sync>( self, ) -> Self::IonMobilityFrameSource<CF, DF>
Call
AsyncIntoIonMobilityFrameSource::try_into_frame_source, panicking if an error
is returned.Source§async fn has_ion_mobility(&mut self) -> Option<HasIonMobility>
async fn has_ion_mobility(&mut self) -> Option<HasIonMobility>
Reads a sparse 1% of the entries from the
AsyncSpectrumSource, testing
for the presence of ion mobility data.Source§impl<C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncMZFileReader<C, D> for AsyncMZReaderType<File, C, D>
Available on crate feature async only.
impl<C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncMZFileReader<C, D> for AsyncMZReaderType<File, C, D>
Available on crate feature
async only.Source§async fn construct_index_from_stream(&mut self) -> u64
async fn construct_index_from_stream(&mut self) -> u64
An on-trait method of constructing an index. Assumed
to be a trivial wrapper.
Source§async fn open_path<P>(path: P) -> Result<Self>
async fn open_path<P>(path: P) -> Result<Self>
The preferred method of opening a file from a path-like object.
This method will open the file at the provided path, test whether
there is an accompanied index file next to it on the file system,
and if not, build one and save it or otherwise read in the index. Read more
Source§impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncRandomAccessSpectrumIterator<C, D> for AsyncMZReaderType<R, C, D>
impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncRandomAccessSpectrumIterator<C, D> for AsyncMZReaderType<R, C, D>
async fn start_from_id( &mut self, id: &str, ) -> Result<&mut Self, SpectrumAccessError>
async fn start_from_index( &mut self, index: usize, ) -> Result<&mut Self, SpectrumAccessError>
async fn start_from_time( &mut self, time: f64, ) -> Result<&mut Self, SpectrumAccessError>
Source§impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncSpectrumSource<C, D> for AsyncMZReaderType<R, C, D>
impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> AsyncSpectrumSource<C, D> for AsyncMZReaderType<R, C, D>
Source§fn detail_level(&self) -> &DetailLevel
fn detail_level(&self) -> &DetailLevel
Get the
DetailLevel the reader currently usesSource§fn set_detail_level(&mut self, detail_level: DetailLevel)
fn set_detail_level(&mut self, detail_level: DetailLevel)
Set the
DetailLevel for the reader, changing
the amount of work done immediately on loading a
spectrum. Read moreSource§async fn get_spectrum_by_id(
&mut self,
id: &str,
) -> Option<MultiLayerSpectrum<C, D>>
async fn get_spectrum_by_id( &mut self, id: &str, ) -> Option<MultiLayerSpectrum<C, D>>
Retrieve a spectrum by it’s native ID
Source§async fn get_spectrum_by_index(
&mut self,
index: usize,
) -> Option<MultiLayerSpectrum<C, D>>
async fn get_spectrum_by_index( &mut self, index: usize, ) -> Option<MultiLayerSpectrum<C, D>>
Retrieve a spectrum by it’s integer index
Source§async fn get_spectrum_by_time(
&mut self,
time: f64,
) -> Option<MultiLayerSpectrum<C, D>>
async fn get_spectrum_by_time( &mut self, time: f64, ) -> Option<MultiLayerSpectrum<C, D>>
Retrieve a spectrum by its scan start time
Considerably more complex than seeking by ID or index, this involves
a binary search over the spectrum index and assumes that spectra are stored
in chronological order.
Source§fn get_index(&self) -> &OffsetIndex
fn get_index(&self) -> &OffsetIndex
Access the spectrum offset index to enumerate all spectra by ID
Source§fn set_index(&mut self, index: OffsetIndex)
fn set_index(&mut self, index: OffsetIndex)
Set the spectrum offset index. This method shouldn’t be needed if not writing
a new adapter
async fn read_next(&mut self) -> Option<MultiLayerSpectrum<C, D>>
Source§fn len(&self) -> usize
fn len(&self) -> usize
Retrieve the number of spectra in source file, usually by getting
the length of the index. If the index isn’t initialized, this will
be 0.
fn is_empty(&self) -> bool
Source§fn _offset_of_index(&self, index: usize) -> Option<u64>
fn _offset_of_index(&self, index: usize) -> Option<u64>
Helper method to support seeking to an index
Source§impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> MSDataFileMetadata for AsyncMZReaderType<R, C, D>
impl<R: AsyncRead + AsyncSeek + Unpin + Send, C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap + Send + Sync + 'static, D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap + Send + Sync + 'static> MSDataFileMetadata for AsyncMZReaderType<R, C, D>
Source§fn data_processings(&self) -> &Vec<DataProcessing>
fn data_processings(&self) -> &Vec<DataProcessing>
The series of
DataProcessing workflows applied to spectra in
this data file.Source§fn instrument_configurations(&self) -> &HashMap<u32, InstrumentConfiguration>
fn instrument_configurations(&self) -> &HashMap<u32, InstrumentConfiguration>
A mapping over different
InstrumentConfiguration modes that spectra
were acquired under.Source§fn file_description(&self) -> &FileDescription
fn file_description(&self) -> &FileDescription
A description of the contents and the sources for this mass spectrometry
data file.
Source§fn softwares(&self) -> &Vec<Software>
fn softwares(&self) -> &Vec<Software>
The series of
Software applied to the data file to apply different
DataProcessing methods.Source§fn samples(&self) -> &Vec<Sample>
fn samples(&self) -> &Vec<Sample>
A list of sample descriptions that were measured in this data file if
available.
Source§fn data_processings_mut(&mut self) -> &mut Vec<DataProcessing>
fn data_processings_mut(&mut self) -> &mut Vec<DataProcessing>
Mutably access the
DataProcessing list for this data fileSource§fn instrument_configurations_mut(
&mut self,
) -> &mut HashMap<u32, InstrumentConfiguration>
fn instrument_configurations_mut( &mut self, ) -> &mut HashMap<u32, InstrumentConfiguration>
Mutably access the
InstrumentConfiguration mapping for this data fileSource§fn file_description_mut(&mut self) -> &mut FileDescription
fn file_description_mut(&mut self) -> &mut FileDescription
Mutably access the
FileDescription description of the contents and the
sources for this mass spectrometry data file.Source§fn softwares_mut(&mut self) -> &mut Vec<Software>
fn softwares_mut(&mut self) -> &mut Vec<Software>
Mutably access the list of
Software of this data file.fn samples_mut(&mut self) -> &mut Vec<Sample>
Source§fn source_file_name(&self) -> Option<&str>
fn source_file_name(&self) -> Option<&str>
Get the name of the primary source file, if available
Source§fn run_description(&self) -> Option<&MassSpectrometryRun>
fn run_description(&self) -> Option<&MassSpectrometryRun>
Access the
MassSpectrometryRun metadata record if it is availableSource§fn spectrum_count_hint(&self) -> Option<u64>
fn spectrum_count_hint(&self) -> Option<u64>
A hint about how many spectra are in this data file
Source§fn scan_settings(&self) -> Option<&Vec<ScanSettings>>
fn scan_settings(&self) -> Option<&Vec<ScanSettings>>
A list of scan settings in
ScanSettings pre-configured by the instrument
operator prior to the start of data acquisition. Read moreSource§fn scan_settings_mut(&mut self) -> Option<&mut Vec<ScanSettings>>
fn scan_settings_mut(&mut self) -> Option<&mut Vec<ScanSettings>>
Mutably access the list of
ScanSettings for this dataset. Most formats do not
possess a related concept and will not carry one.Source§fn copy_metadata_from(&mut self, source: &impl MSDataFileMetadata)where
Self: Sized,
fn copy_metadata_from(&mut self, source: &impl MSDataFileMetadata)where
Self: Sized,
Copy the metadata from another
MSDataFileMetadata implementation into
this one.fn set_spectrum_count_hint(&mut self, _value: Option<u64>)
Source§fn run_description_mut(&mut self) -> Option<&mut MassSpectrometryRun>
fn run_description_mut(&mut self) -> Option<&mut MassSpectrometryRun>
Mutably access the
MassSpectrometryRun metadata record if it is availableAuto Trait Implementations§
impl<R, C = CentroidPeak, D = DeconvolutedPeak> !RefUnwindSafe for AsyncMZReaderType<R, C, D>
impl<R, C = CentroidPeak, D = DeconvolutedPeak> !UnwindSafe for AsyncMZReaderType<R, C, D>
impl<R, C, D> Freeze for AsyncMZReaderType<R, C, D>
impl<R, C, D> Send for AsyncMZReaderType<R, C, D>
impl<R, C, D> Sync for AsyncMZReaderType<R, C, D>
impl<R, C, D> Unpin for AsyncMZReaderType<R, C, D>
impl<R, C, D> UnsafeUnpin for AsyncMZReaderType<R, C, D>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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,
impl<T> Read<Exclusive, BecauseExclusive> 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.