Check out example codes for "casting in rust". It will help you in understanding the concepts better.

Code Example 1

// Explicit conversion
    let integer = decimal as u8;
    let character = integer as char;

Learn ReactJs, React Native from akashmittal.com