You might have noticed that we are not using the try-operator (?) while reading or writing in this recipe. This is because the function's expected error types, se::Error [77] and de::Error[93], are incompatible with std::io::Error. In Chapter 6, Handling Errors; Providing user-defined Error types, we will explore how to avoid this by returning our own error type that encompasses the other ones mentioned.
The TOML crate used in this recipe is the same one that Cargo itself uses. If you are interested in how Cargo parses its own Cargo.toml file, you can check out https://github.com/rust-lang/cargo/blob/master/src/cargo/util/toml/mod.rs.