Enum mzdata::params::ControlledVocabulary
source · pub enum ControlledVocabulary {
MS,
UO,
Unknown,
}
Expand description
Controlled vocabularies used in mass spectrometry data files
Variants§
MS
The PSI-MS Controlled Vocabulary https://www.ebi.ac.uk/ols4/ontologies/ms
UO
The Unit Ontology https://www.ebi.ac.uk/ols4/ontologies/uo
Unknown
Implementations§
source§impl<'a> ControlledVocabulary
impl<'a> ControlledVocabulary
sourcepub const fn prefix(&self) -> Cow<'static, str>
pub const fn prefix(&self) -> Cow<'static, str>
Get the CURIE namespace prefix for this controlled vocabulary
sourcepub const fn as_bytes(&self) -> &'static [u8] ⓘ
pub const fn as_bytes(&self) -> &'static [u8] ⓘ
Like ControlledVocabulary::prefix
, but obtain a byte string instead
pub const fn as_option(&self) -> Option<Self>
sourcepub fn param<A: Into<AccessionLike<'a>>, S: Into<String>>(
&self,
accession: A,
name: S
) -> Param
pub fn param<A: Into<AccessionLike<'a>>, S: Into<String>>( &self, accession: A, name: S ) -> Param
pub const fn curie(&self, accession: u32) -> CURIE
sourcepub const fn const_param(
&self,
name: &'static str,
value: ValueRef<'static>,
accession: u32,
unit: Unit
) -> ParamCow<'static>
pub const fn const_param( &self, name: &'static str, value: ValueRef<'static>, accession: u32, unit: Unit ) -> ParamCow<'static>
Create a ParamCow
from this namespace in a const
context, useful for preparing
global constants or inlined variables.
All parameters must have a 'static
lifetime.
§Arguments
name
: The name of the controlled vocabulary term.value
: The wrapped value as a constant.accession
: The a priori determined accession code for the termunit
: The unit associated with the value
sourcepub const fn const_param_ident(
&self,
name: &'static str,
accession: u32
) -> ParamCow<'static>
pub const fn const_param_ident( &self, name: &'static str, accession: u32 ) -> ParamCow<'static>
Create a ParamCow
from this namespace in a const
context with an empty
value and no unit.
See ControlledVocabulary::const_param
for more details.
sourcepub const fn const_param_ident_unit(
&self,
name: &'static str,
accession: u32,
unit: Unit
) -> ParamCow<'static>
pub const fn const_param_ident_unit( &self, name: &'static str, accession: u32, unit: Unit ) -> ParamCow<'static>
Create a ParamCow
from this namespace in a const
context with an empty
value but a specified unit.
This is intended to create a “template” that will be copied and have a value specified.
See ControlledVocabulary::const_param
for more details.
sourcepub fn param_val<S: Into<String>, A: Into<AccessionLike<'a>>, V: Into<Value>>(
&self,
accession: A,
name: S,
value: V
) -> Param
pub fn param_val<S: Into<String>, A: Into<AccessionLike<'a>>, V: Into<Value>>( &self, accession: A, name: S, value: V ) -> Param
Create a Param
whose accession comes from this controlled vocabulary namespace with
the given value.
§Arguments
accession
: The accession code for theParam
. If specified as aCURIE
or a string-like type, any namespace is ignored.name
: The name of the parametervalue
: The value of the parameter
§See Also
Trait Implementations§
source§impl Clone for ControlledVocabulary
impl Clone for ControlledVocabulary
source§fn clone(&self) -> ControlledVocabulary
fn clone(&self) -> ControlledVocabulary
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ControlledVocabulary
impl Debug for ControlledVocabulary
source§impl FromStr for ControlledVocabulary
impl FromStr for ControlledVocabulary
source§impl Hash for ControlledVocabulary
impl Hash for ControlledVocabulary
source§impl PartialEq for ControlledVocabulary
impl PartialEq for ControlledVocabulary
source§fn eq(&self, other: &ControlledVocabulary) -> bool
fn eq(&self, other: &ControlledVocabulary) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ControlledVocabulary
impl Eq for ControlledVocabulary
impl StructuralPartialEq for ControlledVocabulary
Auto Trait Implementations§
impl Freeze for ControlledVocabulary
impl RefUnwindSafe for ControlledVocabulary
impl Send for ControlledVocabulary
impl Sync for ControlledVocabulary
impl Unpin for ControlledVocabulary
impl UnwindSafe for ControlledVocabulary
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
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
key
and return true
if they are equal.source§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>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.