Rust normally prevents you from defining a public function with a signature involving a private type. However, due to a bug, Rust only checks for a type's pub modifier rather than ensuring it's exported from the crate (see here). This PR properly re-exports the Error and Result types so that errors can be properly handled by users of libsoxr-rs.
Given that the error type will now be public, I switched to using named public fields inside the Error struct and added some doc comments.
Rust normally prevents you from defining a public function with a signature involving a private type. However, due to a bug, Rust only checks for a type's
pub
modifier rather than ensuring it's exported from the crate (see here). This PR properly re-exports theError
andResult
types so that errors can be properly handled by users oflibsoxr-rs
.Given that the error type will now be public, I switched to using named public fields inside the Error struct and added some doc comments.