Type Definition opentitanlib::util::status::RawStatus
pub type RawStatus = status;
Expand description
We use the error category codes from absl_status.h. We build a packed status value that identifies the source of the error (in the form of the module identifier and line number).
By default, the module identifier is the first three letters of the source filename. The identifier can be overridden (per-module) with the DECLARE_MODULE_ID macro.
Our status codes are arranged as a packed bitfield, with the sign bit signifying whether the value represents a result or an error.
All Ok (good) values: 32 31 0 +—+———————————————+ | | 31 bit | | 0 | Result | +—+———————————————+
All Error values: 32 31 26 21 16 5 0 +—+—––+—––+—––+———––+—––+ | | 15 bit | 11 bit | 5 bit | | 1 | Module Identifier | Line Number | code | +—+—––+—––+—––+———––+—––+
The module identifier value is interpreted as three 5-bit fields representing the characters [0x40..0x5F] (e.g. [@ABC … _]).