Document our Rust coding standards for error/failure types
Every crate which returns Result<T, E>
s or Option<T>
anywhere in its public interface should have an errors.rs
module containing error types which implement either Display
or Debug
. See the errors.rs
addition to the protover
crate from legacy/trac#24031 (moved) for an example.
In the future, when failure is 1.0.0, we should also require ::failure::Fail
for making errors easier to work with between crates.