Focus mode

Rust Fundamentals

Expressions:Type Casts (..as..)

Converting a value from one type to another should be done explicitly in Rust. The "as" keyword is used for this operation and there are some rules for conversion between types. 

For example:

Numeric types are easily converted with each other, but converting large number types to a smaller type causes problems.

You can find detailed further information from Rust Official documentation:

https://doc.rust-lang.org/rust-by-example/types/cast.html 

left-disk

Programs to Accelerate Your Progress in a Software Career

Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!

right-cube

Comments

You need to enroll in the course to be able to comment!