Rust - Scalar Types

 

Integers:

Unsigned   Signed

u8 - i8

u16 - i16

u32 - i32

u64 - i64

u128 - i128

usize - isize -- equal to platform size


float: 

f32

f64



let x = 5_u16;   and  let x = 5u16; and let x:u16 = 5; are same.

let y = 3.14_f32   and  let y = 3.14f32 and let y:f32 = 3.14; are same;


boolean


true,false


char is not 8byte. Any action sound to emoj and character. Useless..



Comments

Popular posts from this blog

BIOFLOC