jam_types/
simple_result_code.rspub type SimpleResult = u32;
#[repr(u32)]
pub enum SimpleResultCode {
Ok = 0,
Nothing = u32::MAX,
HostCallInvalid = Self::Nothing as u32 - 1,
OutOfBounds = Self::Nothing as u32 - 2,
IndexUnknown = Self::Nothing as u32 - 3,
StorageFull = Self::Nothing as u32 - 4,
BadCore = Self::Nothing as u32 - 5,
NoCash = Self::Nothing as u32 - 6,
GasLimitTooLow = Self::Nothing as u32 - 7,
GasLimitTooHigh = Self::Nothing as u32 - 8,
ActionInvalid = Self::Nothing as u32 - 9,
}
impl From<SimpleResultCode> for SimpleResult {
fn from(code: SimpleResultCode) -> Self {
code as Self
}
}
pub const LOWEST_ERROR: SimpleResult = SimpleResultCode::ActionInvalid as SimpleResult;