Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Types

Syntax
Type
      i32 | i16 | i32 | i64
    | u8 | u16 | u32 | u64
    | f32 | f64
    | char
    | bool
    | Path
    | [ Type ; INTEGER_LITERAL ]
    | ( TypeList? )
    | & Type
    | && Type

TypeListType ( , Type )*

Type i32 i16 i32 i64 u8 u16 u32 u64 f32 f64 char bool Path [ Type ; INTEGER_LITERAL ] ( TypeList ) & Type && Type

Example

let a: i32;

struct Person {
    age: u16,
    name: &char,
}

let people: [Person, 12];