pub trait IonMobilityFrameSource<C = Feature<MZ, IonMobility>, D = ChargedFeature<Mass, IonMobility>, S = MultiLayerIonMobilityFrame<C, D>>: Iterator<Item = S>where
C: FeatureLike<MZ, IonMobility>,
D: FeatureLike<Mass, IonMobility> + KnownCharge,
S: IonMobilityFrameLike<C, D>,{
Show 17 methods
// Required methods
fn reset(&mut self);
fn detail_level(&self) -> &DetailLevel;
fn set_detail_level(&mut self, detail_level: DetailLevel);
fn get_frame_by_id(&mut self, id: &str) -> Option<S>;
fn get_frame_by_index(&mut self, index: usize) -> Option<S>;
fn get_index(&self) -> &OffsetIndex;
fn set_index(&mut self, index: OffsetIndex);
// Provided methods
fn get_frame_by_time(&mut self, time: f64) -> Option<S> { ... }
fn len(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
fn _offset_of_id(&self, id: &str) -> Option<u64> { ... }
fn _offset_of_index(&self, index: usize) -> Option<u64> { ... }
fn _offset_of_time(&mut self, time: f64) -> Option<u64> { ... }
fn get_group_by_index(
&mut self,
index: usize,
) -> Option<IonMobilityFrameGroup<C, D, S>>
where Self: Sized { ... }
fn iter(&mut self) -> IonMobilityFrameIterator<'_, C, D, S, Self> ⓘ
where Self: Sized { ... }
fn groups(
&mut self,
) -> IonMobilityFrameGroupingIterator<IonMobilityFrameIterator<'_, C, D, S, Self>, C, D, S> ⓘ
where Self: Sized { ... }
fn into_groups(self) -> IonMobilityFrameGroupingIterator<Self, C, D, S> ⓘ
where Self: Sized { ... }
}
Expand description
An analog of SpectrumSource
for IonMobilityFrameLike
producing types
Required Methods§
Sourcefn detail_level(&self) -> &DetailLevel
fn detail_level(&self) -> &DetailLevel
Get the DetailLevel
the reader currently uses
Sourcefn 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.
§Note
Not all readers support all detail levels, and the behavior when requesting one of those levels will depend upon the underlying reader.
Sourcefn get_frame_by_id(&mut self, id: &str) -> Option<S>
fn get_frame_by_id(&mut self, id: &str) -> Option<S>
Retrieve a frame by it’s native ID
Sourcefn get_frame_by_index(&mut self, index: usize) -> Option<S>
fn get_frame_by_index(&mut self, index: usize) -> Option<S>
Retrieve a frame by it’s integer index
Sourcefn get_index(&self) -> &OffsetIndex
fn get_index(&self) -> &OffsetIndex
Access the frame offset index to enumerate all frames by ID
Sourcefn set_index(&mut self, index: OffsetIndex)
fn set_index(&mut self, index: OffsetIndex)
Set the frame offset index. This method shouldn’t be needed if not writing a new adapter
Provided Methods§
Sourcefn get_frame_by_time(&mut self, time: f64) -> Option<S>
fn get_frame_by_time(&mut self, time: f64) -> Option<S>
Retrieve a frame by its scan start time Considerably more complex than seeking by ID or index, this involves a binary search over the frame index and assumes that frames are stored in chronological order.
fn is_empty(&self) -> bool
Sourcefn _offset_of_id(&self, id: &str) -> Option<u64>
fn _offset_of_id(&self, id: &str) -> Option<u64>
Helper method to support seeking to an ID
Sourcefn _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
Sourcefn _offset_of_time(&mut self, time: f64) -> Option<u64>
fn _offset_of_time(&mut self, time: f64) -> Option<u64>
Helper method to support seeking to a specific time. Considerably more complex than seeking by ID or index.
Sourcefn get_group_by_index(
&mut self,
index: usize,
) -> Option<IonMobilityFrameGroup<C, D, S>>where
Self: Sized,
fn get_group_by_index(
&mut self,
index: usize,
) -> Option<IonMobilityFrameGroup<C, D, S>>where
Self: Sized,
Get the nth IonMobilityFrameGroup
from this source
Sourcefn iter(&mut self) -> IonMobilityFrameIterator<'_, C, D, S, Self> ⓘwhere
Self: Sized,
fn iter(&mut self) -> IonMobilityFrameIterator<'_, C, D, S, Self> ⓘwhere
Self: Sized,
Open a new iterator over this stream
Sourcefn groups(
&mut self,
) -> IonMobilityFrameGroupingIterator<IonMobilityFrameIterator<'_, C, D, S, Self>, C, D, S> ⓘwhere
Self: Sized,
fn groups(
&mut self,
) -> IonMobilityFrameGroupingIterator<IonMobilityFrameIterator<'_, C, D, S, Self>, C, D, S> ⓘwhere
Self: Sized,
Create a new IonMobilityFrameIterator
over self
and use that state to drive a IonMobilityFrameGroupingIterator
Sourcefn into_groups(self) -> IonMobilityFrameGroupingIterator<Self, C, D, S> ⓘwhere
Self: Sized,
fn into_groups(self) -> IonMobilityFrameGroupingIterator<Self, C, D, S> ⓘwhere
Self: Sized,
Consume self
to create a IonMobilityFrameGroupingIterator
. This is ideal for non-rewindable streams
like io::stdin
which don’t implement io::Seek