Reimplements https://github.com/infinityb/reliable-rw in Rust