Skip to main content

curie

Macro curie 

Source
macro_rules! curie {
    ($ns:ident:$acc:literal) => { ... };
}
Expand description

A syntactic shortcut for creating CURIE instances using compact notation.

The following are identical.

assert_eq!(CURIE::new(ControlledVocabulary::MS, 1000016), curie!(MS:1000016));

This macro has two advantages for writing CURIE “constants”, it does not require a function call (so may be used in match without extra overhead) and is far more succinct.