Module prime_data::error [−][src]
Expand description
Error Handling
Structs
Some errors can happen in more than one context, such as trying to access some number outside of a range. This will give better context to what happened, for example, when unwrapping some function that could return an error, and reading the error message.
This Error Struct is what will be returned with every function in this crate that yields an error
Enums
NotEnoughData - This error happens when someone tries to access some range of numbers that PrimeData does not have information about. The range it stores is the difference between the range given and the data’s range.
OutOfBounds - Same concept, except it doesn’t need to be some range. If you have some set of values {1, 3, 4} and try to access the number 2, it’s in the range but not in the set’s bounds.
Type Definitions
Result abstraction for public methods that return some result