pub struct Param {
pub name: String,
pub value: String,
pub accession: Option<u32>,
pub controlled_vocabulary: Option<ControlledVocabulary>,
pub unit: Unit,
}
Expand description
A controlled vocabulary or user parameter
Fields§
§name: String
§value: String
§accession: Option<u32>
§controlled_vocabulary: Option<ControlledVocabulary>
§unit: Unit
Implementations§
source§impl Param
impl Param
pub fn new() -> Param
pub fn new_key_value<K: Into<String>, V: Into<String>>( name: K, value: V ) -> Param
pub fn parse<T: FromStr>(&self) -> Result<T, T::Err>
pub fn is_controlled(&self) -> bool
pub fn curie(&self) -> Option<String>
pub fn with_unit<S: AsRef<str>, A: AsRef<str>>( self, accession: S, name: A ) -> Param
pub fn with_unit_t(self, unit: &Unit) -> Param
Trait Implementations§
source§impl From<ActivationMethod> for Param
impl From<ActivationMethod> for Param
source§fn from(value: ActivationMethod) -> Self
fn from(value: ActivationMethod) -> Self
Converts to this type from the input type.
source§impl ParamLike for Param
impl ParamLike for Param
fn name(&self) -> &str
fn value(&self) -> &str
fn accession(&self) -> Option<u32>
fn controlled_vocabulary(&self) -> Option<ControlledVocabulary>
fn unit(&self) -> Unit
fn is_ms(&self) -> bool
fn parse<T: FromStr>(&self) -> Result<T, T::Err>
fn is_controlled(&self) -> bool
fn curie(&self) -> Option<CURIE>
source§impl PartialEq<CURIE> for Param
impl PartialEq<CURIE> for Param
source§impl PartialEq for Param
impl PartialEq for Param
impl Eq for Param
impl StructuralPartialEq for Param
Auto Trait Implementations§
impl Freeze for Param
impl RefUnwindSafe for Param
impl Send for Param
impl Sync for Param
impl Unpin for Param
impl UnwindSafe for Param
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> 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.