Closed pianocomposer321 closed 3 weeks ago
Hi there, ytmapi_rs::error::Error should be re-exported as ytmapi_rs::Error for convenience, and then to get the kind for pattern matching you would call into_kind() to get the ErrorKind (similar to std::io::Error). However seems I haven't made ErrorKind public. Happy to accept a PR, otherwise I am hoping to have some time to work in this crate in a week or 2's time. Development note: ErrorKind should be marked #[non_exhaustive] to allow for future error kind's to be added without a breaking change (https://doc.rust-lang.org/src/std/io/error.rs.html#190).
@pianocomposer321 resolved on main, keep an eye out for ytmapi_rs 0.0.3 on crates.io soon.
@pianocomposer321 v0.0.3 now on cargo
Hello, thanks for your work on this!
I ran in to an issue when using it though. Many of the api functions return a
Result
where theErr
variant is of typeytmapi_rs::error:Error
, which is private. This means that I can't match on the error type and react differently depending on what produced the error. Should this module be public?