Inference supports the following types of constants:
Constants can be defined in the following structures:
Note
() unit type is a constant by definition because it does not have any other values except (). That is why we omit it in the list of constant types.
spec Constants {
const a: i32 = 10;
const b: bool = true;
const c: u32 = 0;
fn define_local_constants() {
const d: i32 = 10;
const e: bool = true;
const f: u32 = 0;
}
}