obofoundry.rs
Structures to deserialize OBO Foundry listings into.
Usage
Add the obofoundry
crate to the Cargo.toml
manifest, as well as either
serde_yaml
or serde_json
:
[]
= "0.6"
= "0.8"
Then use the serde
framework to load the listings:
extern crate obofoundry;
extern crate serde_yaml;
let yaml_data = include_str!;
let foundry: Foundry = from_str.unwrap;
It's also possible to use an HTTP library to load the listings from the OBO Foundry
website directly, for instance using reqwest
:
extern crate obofoundry;
extern crate reqwest;
extern crate serde_yaml;
let url = "http://www.obofoundry.org/registry/ontologies.yml";
let mut res = get.unwrap;
let mut yml = String new;
res.read_to_string;
let foundry: Foundry = from_str.unwrap;
Examples
See the online documentation at docs.rs
for more examples.
Changelog
This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.