Struct MZReaderBuilder

Source
pub struct MZReaderBuilder<C = CentroidPeak, D = DeconvolutedPeak>{ /* private fields */ }
Expand description

A builder type for MZReaderType.

To create an instance, see MZReaderType::builder

Implementations§

Source§

impl<C, D> MZReaderBuilder<C, D>

Source

pub fn buffer_size(self, capacity: usize) -> MZReaderBuilder<C, D>

Set the buffer capacity for a streaming reader.

Source

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.

Source

pub fn from_path<P>(self, path: P) -> Result<MZReaderType<File, C, D>, Error>
where P: AsRef<Path>,

Create a reader from a file on the local file system denoted by path.

Source

pub fn from_read_seek<R>( self, source: R, ) -> Result<MZReaderType<R, C, D>, Error>
where R: Read + Seek,

Create a reader from a type that supports io::Read and io::Seek.

§Note

Not all formats can be read from an io type, these will fail to open and an error will be returned

Source

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>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<C, D> Default for MZReaderBuilder<C, D>

Source§

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>

§

impl<C, D> Send for MZReaderBuilder<C, D>
where C: Send, D: Send,

§

impl<C, D> Sync for MZReaderBuilder<C, D>
where C: Sync, D: Sync,

§

impl<C, D> Unpin for MZReaderBuilder<C, D>
where C: Unpin, D: Unpin,

§

impl<C, D> UnwindSafe for MZReaderBuilder<C, D>
where C: UnwindSafe, D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.