[][src]Function casperlabs_types::api_error::result_from

pub fn result_from(value: i32) -> Result<(), ApiError>

Converts an i32 to a Result<(), ApiError>, where 0 represents Ok(()), and all other inputs are mapped to Err(ApiError::<variant>). The full list of mappings can be found in the docs for ApiError.