pub trait ParamLike {
// Required methods
fn name(&self) -> &str;
fn value(&self) -> ValueRef<'_>;
fn accession(&self) -> Option<AccessionIntCode>;
fn controlled_vocabulary(&self) -> Option<ControlledVocabulary>;
fn unit(&self) -> Unit;
// Provided methods
fn is_ms(&self) -> bool { ... }
fn parse<T: FromStr>(&self) -> Result<T, T::Err> { ... }
fn is_controlled(&self) -> bool { ... }
fn curie(&self) -> Option<CURIE> { ... }
}Expand description
Required Methods§
Sourcefn accession(&self) -> Option<AccessionIntCode>
fn accession(&self) -> Option<AccessionIntCode>
The numeric accession code within ParamLike::controlled_vocabulary, if this
parameter is drawn from a controlled vocabulary.
Sourcefn controlled_vocabulary(&self) -> Option<ControlledVocabulary>
fn controlled_vocabulary(&self) -> Option<ControlledVocabulary>
The controlled vocabulary this parameter’s term belongs to, if any.
Provided Methods§
Sourcefn is_ms(&self) -> bool
fn is_ms(&self) -> bool
Check whether this parameter’s term belongs to the PSI-MS controlled vocabulary.
Sourcefn parse<T: FromStr>(&self) -> Result<T, T::Err>
fn parse<T: FromStr>(&self) -> Result<T, T::Err>
Parse the parameter’s value as T. See ParamValue::parse.
Sourcefn is_controlled(&self) -> bool
fn is_controlled(&self) -> bool
Check whether this parameter is drawn from a controlled vocabulary, as opposed to being a free-text user-defined parameter.
Sourcefn curie(&self) -> Option<CURIE>
fn curie(&self) -> Option<CURIE>
Build a CURIE from ParamLike::controlled_vocabulary and
ParamLike::accession, if both are present.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".