oc

Function oc 

Source
pub fn oc(id: impl Into<String>, label: impl Into<String>) -> OntologyClass
Expand description

A shortcut for creating an OntologyClass from its id and label.

ยงExample

use phenopacket_builder::oc;

let seizure = oc("HP:0001250", "Seizure");

assert_eq!(&seizure.id, "HP:0001250");
assert_eq!(&seizure.label, "Seizure");