Document available error codes
This commit is contained in:
committed by
Vinzent Steinberg
parent
d8f4ec8e3a
commit
fde4113cad
@@ -8,9 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Bump MSRV to 1.36, various code improvements (#1011)
|
||||
- Update to getrandom v0.2 (#1041)
|
||||
- Fix: `next_u32_via_fill` and `next_u64_via_fill` now use LE as documented (#?)
|
||||
- Fix: `next_u32_via_fill` and `next_u64_via_fill` now use LE as documented (#1061)
|
||||
- Reduce usage of `unsafe` (#962, #963, #1011)
|
||||
- Annotate feature-gates in documentation (#1019)
|
||||
- Document available error codes (#1061)
|
||||
- Various documentation tweaks
|
||||
- Fix some clippy warnings (#1036)
|
||||
- Apply rustfmt (#926)
|
||||
|
||||
@@ -29,6 +29,9 @@ impl Error {
|
||||
/// Codes at or above this point can be used by users to define their own
|
||||
/// custom errors.
|
||||
///
|
||||
/// This has a fixed value of `(1 << 31) + (1 << 30) = 0xC000_0000`,
|
||||
/// therefore the number of values available for custom codes is `1 << 30`.
|
||||
///
|
||||
/// This is identical to [`getrandom::Error::CUSTOM_START`](https://docs.rs/getrandom/latest/getrandom/struct.Error.html#associatedconstant.CUSTOM_START).
|
||||
pub const CUSTOM_START: u32 = (1 << 31) + (1 << 30);
|
||||
/// Codes below this point represent OS Errors (i.e. positive i32 values).
|
||||
|
||||
Reference in New Issue
Block a user