crispii_errors
crispii_errors is a simple crate, consisting of a single CrispiiError enum.
The basic idea is that this enum provides all possible failure outcomes of a function call, which can be returned as the Err(CrispiiError) variant of the Result type.
This pattern provides library creators and consumers with an easy way to share an understanding of how a function call could fail, allowing the library's consumer to decide how they wish to handle the failure case.
For example:
use ;
/// Adds 1 to num
/// Failure cases:
/// - ImpossibleOperationError -> Attempted to add 1 to a u8::MAX
let result = match add_one ;
License: MIT OR Apache-2.0