[−][src]Crate woah
woah
is a Rust crate which provides the following type:
enum Result<T, L, F> {
Ok(T),
LocalErr(L),
FatalErr(F),
}
This type differentiates between "local errors" which can be handled and "fatal errors" which can't, to
enable the error handling pattern described by Tyler Neely (@spacejam) in the blog post "Error Handling
in a Correctness-Critical Rust Project". woah::Result
is intended to be a more ergonomic
alternative to the Result<Result<T, LocalError>, FatalError>
type proposed in the post.
The important thing to note is that using the question mark operator on woah::Result
causes
any FatalError
to propagate up, while providing Result<T, LocalError>
otherwise, to enable
the local code to handle local errors without propagating them.
Modules
docs | Documentation, including crate features and examples. |
prelude | A collection of re-exports to make |
Structs
IntoIter | An iterator over the value in an |
Iter | An iterator over a reference to the |
IterMut | An iterator over a mutable reference to the |
Enums
Result | A type representing success ( |