Make rust 0.8 compatible

This pull request brings Rust 0.8 compatibility to this library. It's largely the same, just with current APIs.