Skip to main content

ControlledVocabulary

Enum ControlledVocabulary 

Source
#[repr(u8)]
pub enum ControlledVocabulary { MS = 1, UO = 2, EFO = 3, OBI = 4, HANCESTRO = 5, BFO = 6, NCIT = 7, BTO = 8, PRIDE = 9, Unknown = 10, }
Expand description

Controlled vocabularies used in mass spectrometry data files

Variants§

§

MS = 1

The PSI-MS Controlled Vocabulary https://www.ebi.ac.uk/ols4/ontologies/ms

§

UO = 2

§

EFO = 3

The Experimental Factor Ontology https://www.ebi.ac.uk/ols4/ontologies/efo

§

OBI = 4

The Ontology for Biomedical Investigations https://www.ebi.ac.uk/ols4/ontologies/obi

§

HANCESTRO = 5

§

BFO = 6

§

NCIT = 7

The NCI Thesaurus OBO Edition https://www.ebi.ac.uk/ols4/ontologies/ncit

§

BTO = 8

The BRENDA Tissue Ontology https://www.ebi.ac.uk/ols4/ontologies/bto

§

PRIDE = 9

The PRIDE Controlled Vocabulary https://www.ebi.ac.uk/ols4/ontologies/pride

§

Unknown = 10

Implementations§

Source§

impl<'a> ControlledVocabulary

Source

pub const fn prefix(&self) -> Cow<'static, str>

Get the CURIE namespace prefix for this controlled vocabulary

Source

pub const fn as_bytes(&self) -> &'static [u8]

Like ControlledVocabulary::prefix, but obtain a byte string instead

Source

pub const fn as_option(&self) -> Option<Self>

Source

pub fn param<A: Into<AccessionLike<'a>>, S: Into<String>>( &self, accession: A, name: S, ) -> Param

Create a Param whose accession comes from this controlled vocabulary namespace with an empty value.

§Arguments
  • accession: The accession code for the Param. If specified as a CURIE or a string-like type, any namespace is ignored.
  • name: The name of the parameter
§See Also
Source

pub const fn curie(&self, accession: AccessionIntCode) -> CURIE

Source

pub const fn const_param( &self, name: &'static str, value: ValueRef<'static>, accession: AccessionIntCode, 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 term
  • unit: The unit associated with the value
Source

pub const fn const_param_ident( &self, name: &'static str, accession: AccessionIntCode, ) -> 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.

Source

pub const fn const_param_ident_unit( &self, name: &'static str, accession: AccessionIntCode, 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.

Source

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 the Param. If specified as a CURIE or a string-like type, any namespace is ignored.
  • name: The name of the parameter
  • value: The value of the parameter
§See Also

Trait Implementations§

Source§

impl Clone for ControlledVocabulary

Source§

fn clone(&self) -> ControlledVocabulary

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ControlledVocabulary

Source§

impl Debug for ControlledVocabulary

Source§

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

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

impl Eq for ControlledVocabulary

Source§

impl FromStr for ControlledVocabulary

Source§

type Err = ControlledVocabularyResolutionError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for ControlledVocabulary

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ControlledVocabulary

Source§

fn eq(&self, other: &ControlledVocabulary) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ControlledVocabulary

Source§

impl TryFrom<u8> for ControlledVocabulary

Source§

type Error = ControlledVocabularyResolutionError

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.