Skip to main content

ParamDescribedRead

Trait ParamDescribedRead 

Source
pub trait ParamDescribedRead {
    // Required method
    fn params(&self) -> &[Param];

    // Provided methods
    fn get_param_by_name(&self, name: &str) -> Option<&Param> { ... }
    fn get_param_by_curie(&self, curie: &CURIE) -> Option<&Param> { ... }
    fn get_param_by_accession(&self, accession: &str) -> Option<&Param> { ... }
    fn iter_params(&self) -> Iter<'_, Param>  { ... }
}
Expand description

A read-only form of ParamDescribed

Required Methods§

Source

fn params(&self) -> &[Param]

Obtain an immutable slice over the encapsulated Param list

Provided Methods§

Source

fn get_param_by_name(&self, name: &str) -> Option<&Param>

Find the first Param whose name matches name

Source

fn get_param_by_curie(&self, curie: &CURIE) -> Option<&Param>

Find the first Param whose CURIE matches curie

Source

fn get_param_by_accession(&self, accession: &str) -> Option<&Param>

Find the first Param whose Param::accession matches accession

This is equivalent to ParamDescribed::get_param_by_curie on accession.parse::<CURIE>().unwrap()

Source

fn iter_params(&self) -> Iter<'_, Param>

Iterate over the encapsulated parameter list

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ParamDescribedRead for &[Param]

Source§

fn params(&self) -> &[Param]

Implementors§