pub struct MZReaderBuilder<C = CentroidPeak, D = DeconvolutedPeak>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,{ /* private fields */ }
Expand description
A builder type for MZReaderType
.
To create an instance, see MZReaderType::builder
Implementations§
Source§impl<C, D> MZReaderBuilder<C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<C, D> MZReaderBuilder<C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Sourcepub fn buffer_size(self, capacity: usize) -> MZReaderBuilder<C, D>
pub fn buffer_size(self, capacity: usize) -> MZReaderBuilder<C, D>
Set the buffer capacity for a streaming reader.
Sourcepub fn detail_level(self, detail_level: DetailLevel) -> MZReaderBuilder<C, D>
pub fn detail_level(self, detail_level: DetailLevel) -> MZReaderBuilder<C, D>
Set the detail level for controlling how much work the reader will do to load peak information from spectra.
Sourcepub fn from_path<P>(self, path: P) -> Result<MZReaderType<File, C, D>, Error>
pub fn from_path<P>(self, path: P) -> Result<MZReaderType<File, C, D>, Error>
Create a reader from a file on the local file system denoted by path
.
Sourcepub fn from_read_seek<R>(
self,
source: R,
) -> Result<MZReaderType<R, C, D>, Error>
pub fn from_read_seek<R>( self, source: R, ) -> Result<MZReaderType<R, C, D>, Error>
Sourcepub fn from_read<R>(
self,
source: R,
) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<R>, C, D>>, Error>where
R: Read,
pub fn from_read<R>(
self,
source: R,
) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<R>, C, D>>, Error>where
R: Read,
Create a reader from a type that supports io::Read
.
This will internally wrap the file in a PreBufferedStream
for metadata
reading, but does not construct an index for full random access. Attempting
to use the reader to access spectra may move the reader forwards, but it can
never go backwards.
§Note
Not all formats can be read from an io
type, these will
fail to open and an error will be returned
Trait Implementations§
Source§impl<C, D> Debug for MZReaderBuilder<C, D>where
C: Debug + CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: Debug + DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<C, D> Debug for MZReaderBuilder<C, D>where
C: Debug + CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: Debug + DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Source§impl<C, D> Default for MZReaderBuilder<C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<C, D> Default for MZReaderBuilder<C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Source§fn default() -> MZReaderBuilder<C, D>
fn default() -> MZReaderBuilder<C, D>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<C, D> Freeze for MZReaderBuilder<C, D>
impl<C, D> RefUnwindSafe for MZReaderBuilder<C, D>where
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<C, D> Send for MZReaderBuilder<C, D>
impl<C, D> Sync for MZReaderBuilder<C, D>
impl<C, D> Unpin for MZReaderBuilder<C, D>
impl<C, D> UnwindSafe for MZReaderBuilder<C, D>where
C: UnwindSafe,
D: UnwindSafe,
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