Trait IonMobilityFrameSource

Source
pub trait IonMobilityFrameSource<C = Feature<MZ, IonMobility>, D = ChargedFeature<Mass, IonMobility>, S = MultiLayerIonMobilityFrame<C, D>>: Iterator<Item = S>{
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§

Source

fn reset(&mut self)

Rewind the current position of the source to the beginning

Source

fn detail_level(&self) -> &DetailLevel

Get the DetailLevel the reader currently uses

Source

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.

Source

fn get_frame_by_id(&mut self, id: &str) -> Option<S>

Retrieve a frame by it’s native ID

Source

fn get_frame_by_index(&mut self, index: usize) -> Option<S>

Retrieve a frame by it’s integer index

Source

fn get_index(&self) -> &OffsetIndex

Access the frame offset index to enumerate all frames by ID

Source

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§

Source

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.

Source

fn len(&self) -> usize

Retrieve the number of frames in source file

Source

fn is_empty(&self) -> bool

Source

fn _offset_of_id(&self, id: &str) -> Option<u64>

Helper method to support seeking to an ID

Source

fn _offset_of_index(&self, index: usize) -> Option<u64>

Helper method to support seeking to an index

Source

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.

Source

fn get_group_by_index( &mut self, index: usize, ) -> Option<IonMobilityFrameGroup<C, D, S>>
where Self: Sized,

Get the nth IonMobilityFrameGroup from this source

Source

fn iter(&mut self) -> IonMobilityFrameIterator<'_, C, D, S, Self>
where Self: Sized,

Open a new iterator over this stream

Source

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

Source

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

Implementors§