Created
July 12, 2016 06:32
-
-
Save anna-is-cute/a01aab0f9460df4fb83fc1726598bcc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Rules<'a> { | |
order: Option<Order<'a>>, | |
must_exist: Option<bool>, | |
must_be_unique: Option<bool> | |
} | |
struct Order<'a> { | |
paths: Option<Vec<Path<'a>>>, | |
sort: Option<Sort> | |
} | |
struct Path<'a> { | |
exact: Option<&'a str>, | |
contains: Option<&'a str>, | |
default: Option<bool> | |
} | |
struct Sort { | |
alphabetical: Option<SortOption>, | |
path_component_length: Option<SortOption> | |
} | |
enum SortOption { | |
Enabled, | |
Disabled, | |
Reversed | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
"order": { | |
"paths": [ | |
{"exact": "/usr/local/bin"}, | |
{"exact": "/usr/local/sbin"}, | |
{"contains": ".rvm"}, | |
{"default": true} | |
{"exact": "/bin"}, | |
{"exact": "/sbin"} | |
], | |
"sort": { | |
"alphabetical": "yes", | |
"path_component_length": "reverse" | |
} | |
}, | |
"must_exist": true, | |
"must_be_unique": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment