R DESCRIPTION parser
This crate provides a parser and editor for the DESCRIPTION
files used in R
packages.
See https://r-pkgs.org/description.html and https://cran.r-project.org/doc/manuals/R-exts.html for more information on the format.
Besides parsing the control files it also supports parsing and comparison of version strings according to the R package versioning scheme as well as relations between versions.
Example
use FromStr;
use RDescription;
let mut desc = from_str.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
desc.license = "MIT".to_string;
use Version;
let v1: Version = "1.2.3-alpha".parse.unwrap;
let v2: Version = "1.2.3".parse.unwrap;
assert!;
use FromStr;
use Relations;
let v1 = from_str.unwrap;
let rels: Relations = "cli (>= 2.0), crayon (= 1.3.4), testthat".parse.unwrap;
assert_eq!;
assert_eq!;