Format-preserving parser and editor for Debian watch files
This crate supports reading, editing and writing Debian watch files, while preserving the original contents byte-for-byte.
Example:
let wf = new;
assert_eq!;
assert_eq!;
let wf = new;
assert_eq!;
assert_eq!;
let wf: WatchFile = r#"version=4
opts=foo=blah https://foo.com/bar .*/v?(\d\S+)\.tar\.gz
"#.parse.unwrap;
assert_eq!;
assert_eq!;
let entry = wf.entries.next.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
It also supports partial parsing (with some error nodes), which could be useful for e.g. IDEs.