This crate supports reading, editing and writing Debian watch files, while preserving the original contents byte-for-byte.
Example:
```rust let wf = debianwatch::WatchFile::new(None); asserteq!(wf.version(), debianwatch::DEFAULTVERSION); asserteq!("", wf.tostring());
let wf = debianwatch::WatchFile::new(Some(4)); asserteq!(wf.version(), 4); asserteq!("version=4\n", wf.tostring());
let wf: debian_watch::WatchFile = r#"version=4 opts=foo=blah https://foo.com/bar .*/v?(\d\S+).tar.gz "#.parse().unwrap();
asserteq!(wf.version(), 4);
asserteq!(wf.entries().collect::
let entry = wf.entries().next().unwrap(); asserteq!(entry.opts(), maplit::hashmap! { "foo".tostring() => "blah".tostring(), }); asserteq!(&entry.url(), "https://foo.com/bar"); asserteq!(entry.matchingpattern().as_deref(), Some(".*/v?(\d\S+)\.tar\.gz")); ```
It also supports partial parsing (with some error nodes), which could be useful for e.g. IDEs.