Struct mzdata::meta::FileDescription
source · pub struct FileDescription {
pub contents: ParamList,
pub source_files: Vec<SourceFile>,
}
Expand description
A description of the file data file and its contents
Fields§
§contents: ParamList
Descriptors of the content spectra
source_files: Vec<SourceFile>
Any source files involved in producing the current file, such as vendor raw files.
Implementations§
source§impl FileDescription
impl FileDescription
pub fn new(contents: ParamList, source_files: Vec<SourceFile>) -> Self
sourcepub fn has_ms1_spectra(&self) -> bool
pub fn has_ms1_spectra(&self) -> bool
Checks to see if the “MS1 spectrum” term is present in the file contents
Note: This does not actually inspect the spectra in the file, only the metadata, which may be incorrect/missing.
sourcepub fn has_msn_spectra(&self) -> bool
pub fn has_msn_spectra(&self) -> bool
Checks to see if the “MSn spectrum” term is present in the file contents.
Note: This does not actually inspect the spectra in the file, only the metadata, which may be incorrect/missing.
pub fn has_contents(&self) -> bool
Trait Implementations§
source§impl Clone for FileDescription
impl Clone for FileDescription
source§fn clone(&self) -> FileDescription
fn clone(&self) -> FileDescription
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FileDescription
impl Debug for FileDescription
source§impl Default for FileDescription
impl Default for FileDescription
source§fn default() -> FileDescription
fn default() -> FileDescription
Returns the “default value” for a type. Read more
source§impl ParamDescribed for FileDescription
impl ParamDescribed for FileDescription
source§fn params_mut(&mut self) -> &mut ParamList
fn params_mut(&mut self) -> &mut ParamList
Obtain an mutable slice over the encapsulated
Param
listsource§fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)
fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)
Add all parameters from an iterator of
Param
to the entitysource§fn get_param_by_name(&self, name: &str) -> Option<&Param>
fn get_param_by_name(&self, name: &str) -> Option<&Param>
Find the first
Param
whose name matches name
source§fn iter_params(&self) -> Iter<'_, Param>
fn iter_params(&self) -> Iter<'_, Param>
Iterate over the encapsulated parameter list
source§fn iter_params_mut(&mut self) -> IterMut<'_, Param>
fn iter_params_mut(&mut self) -> IterMut<'_, Param>
Iterate mutably over the encapsulated parameter list
source§impl PartialEq for FileDescription
impl PartialEq for FileDescription
source§fn eq(&self, other: &FileDescription) -> bool
fn eq(&self, other: &FileDescription) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FileDescription
impl StructuralPartialEq for FileDescription
Auto Trait Implementations§
impl Freeze for FileDescription
impl RefUnwindSafe for FileDescription
impl Send for FileDescription
impl Sync for FileDescription
impl Unpin for FileDescription
impl UnwindSafe for FileDescription
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.