#[non_exhaustive]pub struct WriteOptions {
pub compression: Compression,
pub record_error_policy: RecordErrorPolicy,
pub spool_dir: Option<PathBuf>,
}Expand description
Options for write_mzml_with_options and
write_indexed_mzml_with_options.
use openmassspec_core::{Compression, RecordErrorPolicy, WriteOptions};
let opts = WriteOptions::new()
.with_compression(Compression::NoCompression)
.with_record_error_policy(RecordErrorPolicy::Skip);
assert_eq!(opts.record_error_policy, RecordErrorPolicy::Skip);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.compression: CompressionBinary-data-array codec. Defaults to Compression::Zlib.
record_error_policy: RecordErrorPolicyHandling of Err records. Defaults to RecordErrorPolicy::Fail.
spool_dir: Option<PathBuf>Directory for the temporary file that holds written spectra once
they pass 64 MiB (see write_mzml_with_options). None, the
default, uses std::env::temp_dir.
Implementations§
Source§impl WriteOptions
impl WriteOptions
Sourcepub fn with_compression(self, compression: Compression) -> Self
pub fn with_compression(self, compression: Compression) -> Self
Set the binary-data-array codec.
Sourcepub fn with_record_error_policy(self, policy: RecordErrorPolicy) -> Self
pub fn with_record_error_policy(self, policy: RecordErrorPolicy) -> Self
Set the record-error policy.
Sourcepub fn with_spool_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn with_spool_dir(self, dir: impl Into<PathBuf>) -> Self
Set the directory for the spectrum spool file.
Trait Implementations§
Source§impl Clone for WriteOptions
impl Clone for WriteOptions
Source§impl Debug for WriteOptions
impl Debug for WriteOptions
Source§impl Default for WriteOptions
impl Default for WriteOptions
impl Eq for WriteOptions
Source§impl PartialEq for WriteOptions
impl PartialEq for WriteOptions
impl StructuralPartialEq for WriteOptions
Auto Trait Implementations§
impl Freeze for WriteOptions
impl RefUnwindSafe for WriteOptions
impl Send for WriteOptions
impl Sync for WriteOptions
impl Unpin for WriteOptions
impl UnsafeUnpin for WriteOptions
impl UnwindSafe for WriteOptions
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