You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rand_core/src/error.rs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,9 @@ impl Error {
29
29
/// Codes at or above this point can be used by users to define their own
30
30
/// custom errors.
31
31
///
32
+
/// This has a fixed value of `(1 << 31) + (1 << 30) = 0xC000_0000`,
33
+
/// therefore the number of values available for custom codes is `1 << 30`.
34
+
///
32
35
/// This is identical to [`getrandom::Error::CUSTOM_START`](https://docs.rs/getrandom/latest/getrandom/struct.Error.html#associatedconstant.CUSTOM_START).
33
36
pubconstCUSTOM_START:u32 = (1 << 31) + (1 << 30);
34
37
/// Codes below this point represent OS Errors (i.e. positive i32 values).
0 commit comments